home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Information / Digests / CSMP Digest / volume 3 / csmp-digest-v3-055 < prev    next >
Mailbox/MIME Entity  |  1995-12-31  |  80.4 KB  |  [TEXT/R*ch]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ISO-8859 text, with CR line terminators default (weak)
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[CR] default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[R*ch]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 52 65 63 65 69 76 65 64 | 2d 44 61 74 65 3a 20 54 |Received|-Date: T|
|00000010| 68 75 2c 20 38 20 53 65 | 70 20 31 39 39 34 20 31 |hu, 8 Se|p 1994 1|
|00000020| 38 3a 35 30 3a 32 32 20 | 2b 30 32 30 30 0d 46 72 |8:50:22 |+0200.Fr|
|00000030| 6f 6d 3a 20 70 6f 74 74 | 69 65 72 40 63 6c 69 70 |om: pott|ier@clip|
|00000040| 70 65 72 2e 65 6e 73 2e | 66 72 20 28 46 72 61 6e |per.ens.|fr (Fran|
|00000050| 63 6f 69 73 20 50 6f 74 | 74 69 65 72 29 0d 53 75 |cois Pot|tier).Su|
|00000060| 62 6a 65 63 74 3a 20 63 | 73 6d 70 2d 64 69 67 65 |bject: c|smp-dige|
|00000070| 73 74 2d 76 33 2d 30 35 | 35 0d 54 6f 3a 20 63 73 |st-v3-05|5.To: cs|
|00000080| 6d 70 2d 64 69 67 65 73 | 74 40 65 6e 73 2e 66 72 |mp-diges|t@ens.fr|
|00000090| 0d 44 61 74 65 3a 20 54 | 68 75 2c 20 38 20 53 65 |.Date: T|hu, 8 Se|
|000000a0| 70 20 31 39 39 34 20 31 | 38 3a 35 30 3a 31 33 20 |p 1994 1|8:50:13 |
|000000b0| 2b 30 32 30 30 20 28 4d | 45 54 20 44 53 54 29 0d |+0200 (M|ET DST).|
|000000c0| 58 2d 4d 61 69 6c 65 72 | 3a 20 45 4c 4d 20 5b 76 |X-Mailer|: ELM [v|
|000000d0| 65 72 73 69 6f 6e 20 32 | 2e 34 20 50 4c 32 33 5d |ersion 2|.4 PL23]|
|000000e0| 0d 4d 69 6d 65 2d 56 65 | 72 73 69 6f 6e 3a 20 31 |.Mime-Ve|rsion: 1|
|000000f0| 2e 30 0d 43 6f 6e 74 65 | 6e 74 2d 54 79 70 65 3a |.0.Conte|nt-Type:|
|00000100| 20 74 65 78 74 2f 70 6c | 61 69 6e 3b 20 63 68 61 | text/pl|ain; cha|
|00000110| 72 73 65 74 3d 49 53 4f | 2d 38 38 35 39 2d 31 0d |rset=ISO|-8859-1.|
|00000120| 43 6f 6e 74 65 6e 74 2d | 54 72 61 6e 73 66 65 72 |Content-|Transfer|
|00000130| 2d 45 6e 63 6f 64 69 6e | 67 3a 20 38 62 69 74 0d |-Encodin|g: 8bit.|
|00000140| 45 72 72 6f 72 73 2d 54 | 6f 3a 20 6c 69 73 74 6d |Errors-T|o: listm|
|00000150| 61 6e 40 65 6e 73 2e 66 | 72 0d 52 65 70 6c 79 2d |an@ens.f|r.Reply-|
|00000160| 54 6f 3a 20 70 6f 74 74 | 69 65 72 40 63 6c 69 70 |To: pott|ier@clip|
|00000170| 70 65 72 2e 65 6e 73 2e | 66 72 0d 58 2d 53 65 71 |per.ens.|fr.X-Seq|
|00000180| 75 65 6e 63 65 3a 20 36 | 30 0d 0d 43 2e 53 2e 4d |uence: 6|0..C.S.M|
|00000190| 2e 50 2e 20 44 69 67 65 | 73 74 20 20 20 20 20 20 |.P. Dige|st |
|000001a0| 20 20 20 20 20 20 20 54 | 68 75 2c 20 30 38 20 53 | T|hu, 08 S|
|000001b0| 65 70 20 39 34 20 20 20 | 20 20 20 20 56 6f 6c 75 |ep 94 | Volu|
|000001c0| 6d 65 20 33 20 3a 20 49 | 73 73 75 65 20 35 35 0d |me 3 : I|ssue 55.|
|000001d0| 20 0d 54 6f 64 61 79 27 | 73 20 54 6f 70 69 63 73 | .Today'|s Topics|
|000001e0| 3a 0d 20 0d 20 20 20 20 | 20 20 20 20 43 6c 6f 76 |:. . | Clov|
|000001f0| 65 72 2b 2e 20 69 6e 74 | 65 72 72 75 70 74 3f 7e |er+. int|errupt?~|
|00000200| 0d 20 20 20 20 20 20 20 | 20 53 74 61 6e 64 61 72 |. | Standar|
|00000210| 64 20 43 20 4c 69 62 72 | 61 72 69 65 73 3a 20 75 |d C Libr|aries: u|
|00000220| 73 65 20 74 68 65 6d 3f | 0d 20 20 20 20 20 20 20 |se them?|. |
|00000230| 20 53 75 6d 6d 61 72 79 | 20 6f 66 20 27 53 61 66 | Summary| of 'Saf|
|00000240| 65 20 53 61 76 65 27 20 | 70 72 6f 62 6c 65 6d 20 |e Save' |problem |
|00000250| 2d 20 49 4d 3a 46 69 6c | 65 73 20 66 6c 61 77 65 |- IM:Fil|es flawe|
|00000260| 64 21 0d 20 20 20 20 20 | 20 20 20 57 68 61 74 20 |d!. | What |
|00000270| 48 61 70 70 65 6e 73 20 | 69 6e 20 74 68 65 20 52 |Happens |in the R|
|00000280| 65 73 6f 75 72 63 65 20 | 46 6f 72 6b 0d 20 20 20 |esource |Fork. |
|00000290| 20 20 20 20 20 57 68 79 | 20 64 6f 65 73 20 4e 65 | Why| does Ne|
|000002a0| 77 47 57 6f 72 6c 64 20 | 64 6f 20 74 68 69 73 3f |wGWorld |do this?|
|000002b0| 0d 20 20 20 20 20 20 20 | 20 57 6f 6e 27 74 20 73 |. | Won't s|
|000002c0| 74 72 61 6e 67 65 20 77 | 69 6e 64 6f 77 73 20 63 |trange w|indows c|
|000002d0| 6f 6d 65 20 69 6e 20 6d | 79 20 6c 61 79 65 72 3f |ome in m|y layer?|
|000002e0| 0d 0d 0d 0d 54 68 65 20 | 43 6f 6d 70 2e 53 79 73 |....The |Comp.Sys|
|000002f0| 2e 4d 61 63 2e 50 72 6f | 67 72 61 6d 6d 65 72 20 |.Mac.Pro|grammer |
|00000300| 44 69 67 65 73 74 20 69 | 73 20 6d 6f 64 65 72 61 |Digest i|s modera|
|00000310| 74 65 64 20 62 79 20 46 | 72 61 6e 63 6f 69 73 20 |ted by F|rancois |
|00000320| 50 6f 74 74 69 65 72 0d | 28 70 6f 74 74 69 65 72 |Pottier.|(pottier|
|00000330| 40 63 6c 69 70 70 65 72 | 2e 65 6e 73 2e 66 72 29 |@clipper|.ens.fr)|
|00000340| 2e 0d 20 0d 54 68 65 20 | 64 69 67 65 73 74 20 69 |.. .The |digest i|
|00000350| 73 20 61 20 63 6f 6c 6c | 65 63 74 69 6f 6e 20 6f |s a coll|ection o|
|00000360| 66 20 61 72 74 69 63 6c | 65 20 74 68 72 65 61 64 |f articl|e thread|
|00000370| 73 20 66 72 6f 6d 20 74 | 68 65 20 69 6e 74 65 72 |s from t|he inter|
|00000380| 6e 65 74 20 6e 65 77 73 | 67 72 6f 75 70 0d 63 6f |net news|group.co|
|00000390| 6d 70 2e 73 79 73 2e 6d | 61 63 2e 70 72 6f 67 72 |mp.sys.m|ac.progr|
|000003a0| 61 6d 6d 65 72 2e 20 20 | 49 74 20 69 73 20 64 65 |ammer. |It is de|
|000003b0| 73 69 67 6e 65 64 20 66 | 6f 72 20 70 65 6f 70 6c |signed f|or peopl|
|000003c0| 65 20 77 68 6f 20 72 65 | 61 64 20 63 2e 73 2e 6d |e who re|ad c.s.m|
|000003d0| 2e 70 2e 20 73 65 6d 69 | 2d 0d 72 65 67 75 6c 61 |.p. semi|-.regula|
|000003e0| 72 6c 79 20 61 6e 64 20 | 77 61 6e 74 20 61 6e 20 |rly and |want an |
|000003f0| 61 72 63 68 69 76 65 20 | 6f 66 20 74 68 65 20 64 |archive |of the d|
|00000400| 69 73 63 75 73 73 69 6f | 6e 73 2e 20 20 49 66 20 |iscussio|ns. If |
|00000410| 79 6f 75 20 64 6f 6e 27 | 74 20 6b 6e 6f 77 20 77 |you don'|t know w|
|00000420| 68 61 74 20 61 0d 6e 65 | 77 73 67 72 6f 75 70 20 |hat a.ne|wsgroup |
|00000430| 69 73 2c 20 79 6f 75 20 | 70 72 6f 62 61 62 6c 79 |is, you |probably|
|00000440| 20 64 6f 6e 27 74 20 68 | 61 76 65 20 61 63 63 65 | don't h|ave acce|
|00000450| 73 73 20 74 6f 20 69 74 | 2e 20 20 41 73 6b 20 79 |ss to it|. Ask y|
|00000460| 6f 75 72 20 73 79 73 74 | 65 6d 73 0d 61 64 6d 69 |our syst|ems.admi|
|00000470| 6e 69 73 74 72 61 74 6f | 72 28 73 29 20 66 6f 72 |nistrato|r(s) for|
|00000480| 20 64 65 74 61 69 6c 73 | 2e 20 20 49 66 20 79 6f | details|. If yo|
|00000490| 75 20 64 6f 6e 27 74 20 | 68 61 76 65 20 61 63 63 |u don't |have acc|
|000004a0| 65 73 73 20 74 6f 20 6e | 65 77 73 2c 20 79 6f 75 |ess to n|ews, you|
|000004b0| 20 6d 61 79 0d 73 74 69 | 6c 6c 20 62 65 20 61 62 | may.sti|ll be ab|
|000004c0| 6c 65 20 74 6f 20 70 6f | 73 74 20 6d 65 73 73 61 |le to po|st messa|
|000004d0| 67 65 73 20 74 6f 20 74 | 68 65 20 67 72 6f 75 70 |ges to t|he group|
|000004e0| 20 62 79 20 75 73 69 6e | 67 20 61 20 6d 61 69 6c | by usin|g a mail|
|000004f0| 20 73 65 72 76 65 72 20 | 6c 69 6b 65 0d 61 6e 6f | server |like.ano|
|00000500| 6e 2e 70 65 6e 65 74 2e | 66 69 20 28 6d 61 69 6c |n.penet.|fi (mail|
|00000510| 20 68 65 6c 70 40 61 6e | 6f 6e 2e 70 65 6e 65 74 | help@an|on.penet|
|00000520| 2e 66 69 20 66 6f 72 20 | 6d 6f 72 65 20 69 6e 66 |.fi for |more inf|
|00000530| 6f 72 6d 61 74 69 6f 6e | 29 2e 0d 20 0d 45 61 63 |ormation|).. .Eac|
|00000540| 68 20 69 73 73 75 65 20 | 6f 66 20 74 68 65 20 64 |h issue |of the d|
|00000550| 69 67 65 73 74 20 63 6f | 6e 74 61 69 6e 73 20 6f |igest co|ntains o|
|00000560| 6e 65 20 6f 72 20 6d 6f | 72 65 20 73 65 74 73 20 |ne or mo|re sets |
|00000570| 6f 66 20 61 72 74 69 63 | 6c 65 73 20 28 63 61 6c |of artic|les (cal|
|00000580| 6c 65 64 0d 74 68 72 65 | 61 64 73 29 2c 20 77 69 |led.thre|ads), wi|
|00000590| 74 68 20 65 61 63 68 20 | 73 65 74 20 63 6f 72 72 |th each |set corr|
|000005a0| 65 73 70 6f 6e 64 69 6e | 67 20 74 6f 20 61 20 27 |espondin|g to a '|
|000005b0| 64 69 73 63 75 73 73 69 | 6f 6e 27 20 6f 66 20 61 |discussi|on' of a|
|000005c0| 20 70 61 72 74 69 63 75 | 6c 61 72 0d 73 75 62 6a | particu|lar.subj|
|000005d0| 65 63 74 2e 20 20 54 68 | 65 20 61 72 74 69 63 6c |ect. Th|e articl|
|000005e0| 65 73 20 61 72 65 20 6e | 6f 74 20 65 64 69 74 65 |es are n|ot edite|
|000005f0| 64 3b 20 61 6c 6c 20 61 | 72 74 69 63 6c 65 73 20 |d; all a|rticles |
|00000600| 69 6e 63 6c 75 64 65 64 | 20 69 6e 20 74 68 69 73 |included| in this|
|00000610| 20 64 69 67 65 73 74 0d | 61 72 65 20 69 6e 20 74 | digest.|are in t|
|00000620| 68 65 69 72 20 6f 72 69 | 67 69 6e 61 6c 20 70 6f |heir ori|ginal po|
|00000630| 73 74 65 64 20 66 6f 72 | 6d 20 28 61 73 20 72 65 |sted for|m (as re|
|00000640| 63 65 69 76 65 64 20 62 | 79 20 6f 75 72 20 6e 65 |ceived b|y our ne|
|00000650| 77 73 20 73 65 72 76 65 | 72 20 61 74 0d 6e 65 66 |ws serve|r at.nef|
|00000660| 2e 65 6e 73 2e 66 72 29 | 2e 20 20 41 72 74 69 63 |.ens.fr)|. Artic|
|00000670| 6c 65 20 74 68 72 65 61 | 64 73 20 61 72 65 20 6e |le threa|ds are n|
|00000680| 6f 74 20 61 64 64 65 64 | 20 74 6f 20 74 68 65 20 |ot added| to the |
|00000690| 64 69 67 65 73 74 20 75 | 6e 74 69 6c 20 74 68 65 |digest u|ntil the|
|000006a0| 20 6c 61 73 74 0d 61 72 | 74 69 63 6c 65 20 61 64 | last.ar|ticle ad|
|000006b0| 64 65 64 20 74 6f 20 74 | 68 65 20 74 68 72 65 61 |ded to t|he threa|
|000006c0| 64 20 69 73 20 61 74 20 | 6c 65 61 73 74 20 74 77 |d is at |least tw|
|000006d0| 6f 20 77 65 65 6b 73 20 | 6f 6c 64 20 28 74 68 69 |o weeks |old (thi|
|000006e0| 73 20 69 73 20 74 6f 20 | 65 6e 73 75 72 65 20 74 |s is to |ensure t|
|000006f0| 68 61 74 0d 74 68 65 20 | 74 68 72 65 61 64 20 69 |hat.the |thread i|
|00000700| 73 20 64 65 61 64 20 62 | 65 66 6f 72 65 20 61 64 |s dead b|efore ad|
|00000710| 64 69 6e 67 20 69 74 20 | 74 6f 20 74 68 65 20 64 |ding it |to the d|
|00000720| 69 67 65 73 74 29 2e 20 | 20 41 72 74 69 63 6c 65 |igest). | Article|
|00000730| 20 74 68 72 65 61 64 73 | 20 74 68 61 74 0d 63 6f | threads| that.co|
|00000740| 6e 73 69 73 74 20 6f 66 | 20 6f 6e 6c 79 20 6f 6e |nsist of| only on|
|00000750| 65 20 6d 65 73 73 61 67 | 65 20 61 72 65 20 67 65 |e messag|e are ge|
|00000760| 6e 65 72 61 6c 6c 79 20 | 6e 6f 74 20 69 6e 63 6c |nerally |not incl|
|00000770| 75 64 65 64 20 69 6e 20 | 74 68 65 20 64 69 67 65 |uded in |the dige|
|00000780| 73 74 2e 0d 0d 54 68 65 | 20 64 69 67 65 73 74 20 |st...The| digest |
|00000790| 69 73 20 6f 66 66 69 63 | 69 61 6c 6c 79 20 64 69 |is offic|ially di|
|000007a0| 73 74 72 69 62 75 74 65 | 64 20 62 79 20 74 77 6f |stribute|d by two|
|000007b0| 20 6d 65 61 6e 73 2c 20 | 62 79 20 65 6d 61 69 6c | means, |by email|
|000007c0| 20 61 6e 64 20 66 74 70 | 2e 0d 0d 49 66 20 79 6f | and ftp|...If yo|
|000007d0| 75 20 77 61 6e 74 20 74 | 6f 20 72 65 63 65 69 76 |u want t|o receiv|
|000007e0| 65 20 74 68 65 20 64 69 | 67 65 73 74 20 62 79 20 |e the di|gest by |
|000007f0| 6d 61 69 6c 2c 20 73 65 | 6e 64 20 65 6d 61 69 6c |mail, se|nd email|
|00000800| 20 74 6f 20 6c 69 73 74 | 73 65 72 76 40 65 6e 73 | to list|serv@ens|
|00000810| 2e 66 72 0d 77 69 74 68 | 20 6e 6f 20 73 75 62 6a |.fr.with| no subj|
|00000820| 65 63 74 20 61 6e 64 20 | 6f 6e 65 20 6f 66 20 74 |ect and |one of t|
|00000830| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 63 6f 6d |he follo|wing com|
|00000840| 6d 61 6e 64 73 20 61 73 | 20 62 6f 64 79 3a 0d 20 |mands as| body:. |
|00000850| 20 20 20 68 65 6c 70 09 | 09 20 20 20 20 20 20 20 | help.|. |
|00000860| 20 20 20 20 20 20 20 20 | 20 53 65 6e 64 73 20 79 | | Sends y|
|00000870| 6f 75 20 61 20 73 75 6d | 6d 61 72 79 20 6f 66 20 |ou a sum|mary of |
|00000880| 63 6f 6d 6d 61 6e 64 73 | 0d 20 20 20 20 73 75 62 |commands|. sub|
|00000890| 73 63 72 69 62 65 20 63 | 73 6d 70 2d 64 69 67 65 |scribe c|smp-dige|
|000008a0| 73 74 20 59 6f 75 72 20 | 4e 61 6d 65 09 41 64 64 |st Your |Name.Add|
|000008b0| 73 20 79 6f 75 20 74 6f | 20 74 68 65 20 6d 61 69 |s you to| the mai|
|000008c0| 6c 69 6e 67 20 6c 69 73 | 74 0d 20 20 20 20 73 69 |ling lis|t. si|
|000008d0| 67 6e 6f 66 66 20 63 73 | 6d 70 2d 64 69 67 65 73 |gnoff cs|mp-diges|
|000008e0| 74 09 09 09 52 65 6d 6f | 76 65 73 20 79 6f 75 20 |t...Remo|ves you |
|000008f0| 66 72 6f 6d 20 74 68 65 | 20 6c 69 73 74 0d 4f 6e |from the| list.On|
|00000900| 63 65 20 79 6f 75 20 68 | 61 76 65 20 73 75 62 73 |ce you h|ave subs|
|00000910| 63 72 69 62 65 64 2c 20 | 79 6f 75 20 77 69 6c 6c |cribed, |you will|
|00000920| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 72 | automat|ically r|
|00000930| 65 63 65 69 76 65 20 65 | 61 63 68 20 6e 65 77 0d |eceive e|ach new.|
|00000940| 69 73 73 75 65 20 61 73 | 20 69 74 20 69 73 20 63 |issue as| it is c|
|00000950| 72 65 61 74 65 64 2e 0d | 0d 54 68 65 20 6f 66 66 |reated..|.The off|
|00000960| 69 63 69 61 6c 20 66 74 | 70 20 69 6e 66 6f 20 69 |icial ft|p info i|
|00000970| 73 20 2f 2f 66 74 70 2e | 64 61 72 74 6d 6f 75 74 |s //ftp.|dartmout|
|00000980| 68 2e 65 64 75 2f 70 75 | 62 2f 63 73 6d 70 2d 64 |h.edu/pu|b/csmp-d|
|00000990| 69 67 65 73 74 2e 0d 51 | 75 65 73 74 69 6f 6e 73 |igest..Q|uestions|
|000009a0| 20 72 65 6c 61 74 65 64 | 20 74 6f 20 74 68 65 20 | related| to the |
|000009b0| 66 74 70 20 73 69 74 65 | 20 73 68 6f 75 6c 64 20 |ftp site| should |
|000009c0| 62 65 20 64 69 72 65 63 | 74 65 64 20 74 6f 0d 73 |be direc|ted to.s|
|000009d0| 63 6f 74 74 2e 73 69 6c | 76 65 72 40 64 61 72 74 |cott.sil|ver@dart|
|000009e0| 6d 6f 75 74 68 2e 65 64 | 75 2e 20 43 75 72 72 65 |mouth.ed|u. Curre|
|000009f0| 6e 74 6c 79 20 6e 6f 20 | 70 72 65 76 69 6f 75 73 |ntly no |previous|
|00000a00| 20 76 6f 6c 75 6d 65 73 | 20 6f 66 20 74 68 65 20 | volumes| of the |
|00000a10| 43 53 4d 50 0d 64 69 67 | 65 73 74 20 61 72 65 20 |CSMP.dig|est are |
|00000a20| 61 76 61 69 6c 61 62 6c | 65 20 74 68 65 72 65 2e |availabl|e there.|
|00000a30| 0d 0d 41 6c 73 6f 2c 20 | 74 68 65 20 64 69 67 65 |..Also, |the dige|
|00000a40| 73 74 73 20 61 72 65 20 | 61 76 61 69 6c 61 62 6c |sts are |availabl|
|00000a50| 65 20 74 6f 20 57 41 49 | 53 20 75 73 65 72 73 2e |e to WAI|S users.|
|00000a60| 20 20 54 6f 20 73 65 61 | 72 63 68 20 62 61 63 6b | To sea|rch back|
|00000a70| 20 69 73 73 75 65 73 0d | 77 69 74 68 20 57 41 49 | issues.|with WAI|
|00000a80| 53 2c 20 75 73 65 20 63 | 6f 6d 70 2e 73 79 73 2e |S, use c|omp.sys.|
|00000a90| 6d 61 63 2e 70 72 6f 67 | 72 61 6d 6d 65 72 2e 73 |mac.prog|rammer.s|
|00000aa0| 72 63 2e 20 57 69 74 68 | 20 4d 6f 73 61 69 63 2c |rc. With| Mosaic,|
|00000ab0| 20 75 73 65 0d 68 74 74 | 70 3a 2f 2f 77 77 77 2e | use.htt|p://www.|
|00000ac0| 77 61 69 73 2e 63 6f 6d | 2f 77 61 69 73 2d 64 62 |wais.com|/wais-db|
|00000ad0| 73 2f 63 6f 6d 70 2e 73 | 79 73 2e 6d 61 63 2e 70 |s/comp.s|ys.mac.p|
|00000ae0| 72 6f 67 72 61 6d 6d 65 | 72 2e 68 74 6d 6c 2e 0d |rogramme|r.html..|
|00000af0| 0d 0d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..------|--------|
|00000b00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0d 0d 3e 46 72 6f 6d |--------|-..>From|
|00000b30| 20 61 72 74 68 75 72 5f | 62 61 62 69 74 7a 40 6d | arthur_|babitz@m|
|00000b40| 65 6e 74 6f 72 67 2e 63 | 6f 6d 20 28 41 72 74 68 |entorg.c|om (Arth|
|00000b50| 75 72 20 42 61 62 69 74 | 7a 29 0d 53 75 62 6a 65 |ur Babit|z).Subje|
|00000b60| 63 74 3a 20 43 6c 6f 76 | 65 72 2b 2e 20 69 6e 74 |ct: Clov|er+. int|
|00000b70| 65 72 72 75 70 74 3f 0d | 44 61 74 65 3a 20 54 75 |errupt?.|Date: Tu|
|00000b80| 65 2c 20 32 33 20 41 75 | 67 20 31 39 39 34 20 31 |e, 23 Au|g 1994 1|
|00000b90| 33 3a 35 31 3a 30 38 20 | 2d 30 38 30 30 0d 4f 72 |3:51:08 |-0800.Or|
|00000ba0| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 4d 65 6e 74 |ganizati|on: Ment|
|00000bb0| 6f 72 20 47 72 61 70 68 | 69 63 73 20 43 6f 72 70 |or Graph|ics Corp|
|00000bc0| 2e 2c 20 57 69 6c 73 6f | 6e 76 69 6c 6c 65 2c 20 |., Wilso|nville, |
|00000bd0| 4f 52 2e 2c 20 55 53 41 | 0d 0d 49 27 76 65 20 62 |OR., USA|..I've b|
|00000be0| 65 65 6e 20 74 72 79 69 | 6e 67 20 75 6e 73 75 63 |een tryi|ng unsuc|
|00000bf0| 63 65 73 73 66 75 6c 6c | 79 20 74 6f 20 69 6d 70 |cessfull|y to imp|
|00000c00| 6c 65 6d 65 6e 74 20 61 | 20 22 63 6c 6f 76 65 72 |lement a| "clover|
|00000c10| 2b 2e 22 20 69 6e 74 65 | 72 72 75 70 74 20 66 6f |+." inte|rrupt fo|
|00000c20| 72 20 61 0d 63 6f 6d 70 | 75 74 65 20 69 6e 74 65 |r a.comp|ute inte|
|00000c30| 6e 73 69 76 65 20 70 61 | 72 74 20 6f 66 20 61 6e |nsive pa|rt of an|
|00000c40| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 2e 20 20 49 | applica|tion. I|
|00000c50| 20 77 6f 6e 27 74 20 62 | 6f 72 65 20 79 6f 75 20 | won't b|ore you |
|00000c60| 77 69 74 68 20 61 20 6c | 69 73 74 20 6f 66 0d 74 |with a l|ist of.t|
|00000c70| 68 69 6e 67 73 20 49 27 | 76 65 20 74 72 69 65 64 |hings I'|ve tried|
|00000c80| 20 77 68 69 63 68 20 64 | 6f 6e 27 74 20 77 6f 72 | which d|on't wor|
|00000c90| 6b 2c 20 62 75 74 20 63 | 61 6e 20 73 6f 6d 65 6f |k, but c|an someo|
|00000ca0| 6e 65 20 70 6f 69 6e 74 | 20 6d 65 20 69 6e 20 74 |ne point| me in t|
|00000cb0| 68 65 20 72 69 67 68 74 | 0d 64 69 72 65 63 74 69 |he right|.directi|
|00000cc0| 6f 6e 3f 20 20 53 65 65 | 6d 73 20 6c 69 6b 65 20 |on? See|ms like |
|00000cd0| 74 68 65 72 65 20 6d 75 | 73 74 20 62 65 20 61 20 |there mu|st be a |
|00000ce0| 73 74 61 6e 64 61 72 64 | 2c 20 73 69 6d 70 6c 65 |standard|, simple|
|00000cf0| 20 73 6f 6c 75 74 69 6f | 6e 20 74 6f 20 74 68 69 | solutio|n to thi|
|00000d00| 73 0d 70 72 6f 62 6c 65 | 6d 2e 0d 0d 54 68 61 6e |s.proble|m...Than|
|00000d10| 6b 73 21 0d 0d 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |ks!..+++|++++++++|
|00000d20| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00000d30| 0d 0d 3e 46 72 6f 6d 20 | 74 69 6d 6f 74 68 79 73 |..>From |timothys|
|00000d40| 40 68 6f 6f 64 2e 75 75 | 63 70 20 28 54 69 6d 6f |@hood.uu|cp (Timo|
|00000d50| 74 68 79 20 53 68 65 72 | 62 75 72 6e 65 29 0d 44 |thy Sher|burne).D|
|00000d60| 61 74 65 3a 20 32 34 20 | 41 75 67 20 39 34 20 31 |ate: 24 |Aug 94 1|
|00000d70| 36 3a 31 39 3a 34 36 20 | 47 4d 54 0d 4f 72 67 61 |6:19:46 |GMT.Orga|
|00000d80| 6e 69 7a 61 74 69 6f 6e | 3a 20 55 6e 69 76 65 72 |nization|: Univer|
|00000d90| 73 69 74 79 20 6f 66 20 | 50 6f 72 74 6c 61 6e 64 |sity of |Portland|
|00000da0| 0d 0d 61 72 74 68 75 72 | 5f 62 61 62 69 74 7a 40 |..arthur|_babitz@|
|00000db0| 6d 65 6e 74 6f 72 67 2e | 63 6f 6d 20 28 41 72 74 |mentorg.|com (Art|
|00000dc0| 68 75 72 20 42 61 62 69 | 74 7a 29 20 77 72 69 74 |hur Babi|tz) writ|
|00000dd0| 65 73 3a 0d 0d 3e 49 27 | 76 65 20 62 65 65 6e 20 |es:..>I'|ve been |
|00000de0| 74 72 79 69 6e 67 20 75 | 6e 73 75 63 63 65 73 73 |trying u|nsuccess|
|00000df0| 66 75 6c 6c 79 20 74 6f | 20 69 6d 70 6c 65 6d 65 |fully to| impleme|
|00000e00| 6e 74 20 61 20 22 63 6c | 6f 76 65 72 2b 2e 22 20 |nt a "cl|over+." |
|00000e10| 69 6e 74 65 72 72 75 70 | 74 20 66 6f 72 20 61 0d |interrup|t for a.|
|00000e20| 3e 63 6f 6d 70 75 74 65 | 20 69 6e 74 65 6e 73 69 |>compute| intensi|
|00000e30| 76 65 20 70 61 72 74 20 | 6f 66 20 61 6e 20 61 70 |ve part |of an ap|
|00000e40| 70 6c 69 63 61 74 69 6f | 6e 2e 20 20 49 20 77 6f |plicatio|n. I wo|
|00000e50| 6e 27 74 20 62 6f 72 65 | 20 79 6f 75 20 77 69 74 |n't bore| you wit|
|00000e60| 68 20 61 20 6c 69 73 74 | 20 6f 66 0d 3e 74 68 69 |h a list| of.>thi|
|00000e70| 6e 67 73 20 49 27 76 65 | 20 74 72 69 65 64 20 77 |ngs I've| tried w|
|00000e80| 68 69 63 68 20 64 6f 6e | 27 74 20 77 6f 72 6b 2c |hich don|'t work,|
|00000e90| 20 62 75 74 20 63 61 6e | 20 73 6f 6d 65 6f 6e 65 | but can| someone|
|00000ea0| 20 70 6f 69 6e 74 20 6d | 65 20 69 6e 20 74 68 65 | point m|e in the|
|00000eb0| 20 72 69 67 68 74 0d 3e | 64 69 72 65 63 74 69 6f | right.>|directio|
|00000ec0| 6e 3f 20 20 53 65 65 6d | 73 20 6c 69 6b 65 20 74 |n? Seem|s like t|
|00000ed0| 68 65 72 65 20 6d 75 73 | 74 20 62 65 20 61 20 73 |here mus|t be a s|
|00000ee0| 74 61 6e 64 61 72 64 2c | 20 73 69 6d 70 6c 65 20 |tandard,| simple |
|00000ef0| 73 6f 6c 75 74 69 6f 6e | 20 74 6f 20 74 68 69 73 |solution| to this|
|00000f00| 0d 3e 70 72 6f 62 6c 65 | 6d 2e 0d 0d 3e 54 68 61 |.>proble|m...>Tha|
|00000f10| 6e 6b 73 21 0d 0d 54 68 | 65 20 74 72 69 63 6b 20 |nks!..Th|e trick |
|00000f20| 69 73 20 74 6f 20 63 68 | 65 63 6b 20 66 6f 72 20 |is to ch|eck for |
|00000f30| 61 20 63 6d 64 2d 2e 20 | 28 74 68 65 20 22 63 6c |a cmd-. |(the "cl|
|00000f40| 6f 76 65 72 22 20 6b 65 | 79 20 69 73 20 75 73 75 |over" ke|y is usu|
|00000f50| 61 6c 6c 79 20 63 61 6c | 6c 65 64 20 74 68 65 20 |ally cal|led the |
|00000f60| 63 6f 6d 6d 61 6e 64 20 | 6b 65 79 29 20 69 6e 20 |command |key) in |
|00000f70| 79 6f 75 72 20 65 76 65 | 6e 74 20 6c 6f 6f 70 2e |your eve|nt loop.|
|00000f80| 20 20 4f 72 20 79 6f 75 | 20 63 6f 75 6c 64 20 69 | Or you| could i|
|00000f90| 6d 70 6c 65 6d 65 6e 74 | 20 61 20 47 65 74 4b 65 |mplement| a GetKe|
|00000fa0| 79 73 20 66 69 6c 74 65 | 72 2e 0d 0d 48 65 72 65 |ys filte|r...Here|
|00000fb0| 27 73 20 61 20 73 6e 69 | 70 70 65 74 20 75 73 69 |'s a sni|ppet usi|
|00000fc0| 6e 67 20 57 61 69 74 4e | 65 78 74 45 76 65 6e 74 |ng WaitN|extEvent|
|00000fd0| 20 74 68 61 74 20 72 65 | 74 75 72 6e 73 20 61 20 | that re|turns a |
|00000fe0| 22 74 72 75 65 22 20 69 | 66 20 63 6d 64 2d 2e 20 |"true" i|f cmd-. |
|00000ff0| 69 73 20 64 65 74 65 63 | 74 65 64 3a 0d 0d 42 6f |is detec|ted:..Bo|
|00001000| 6f 6c 65 61 6e 20 43 68 | 65 63 6b 46 6f 72 43 6d |olean Ch|eckForCm|
|00001010| 64 50 65 72 69 6f 64 20 | 28 76 6f 69 64 29 0d 7b |dPeriod |(void).{|
|00001020| 0d 09 45 76 65 6e 74 52 | 65 63 6f 72 64 09 74 68 |..EventR|ecord.th|
|00001030| 65 45 76 65 6e 74 3b 0d | 09 63 68 61 72 09 09 6b |eEvent;.|.char..k|
|00001040| 65 79 3b 0d 09 42 6f 6f | 6c 65 61 6e 09 09 72 65 |ey;..Boo|lean..re|
|00001050| 73 75 6c 74 20 3d 20 66 | 61 6c 73 65 3b 0d 09 0d |sult = f|alse;...|
|00001060| 09 2f 2f 20 57 61 69 74 | 20 66 6f 72 20 61 6e 20 |.// Wait| for an |
|00001070| 65 76 65 6e 74 2e 2e 2e | 0d 09 0d 09 69 66 20 28 |event...|....if (|
|00001080| 57 61 69 74 4e 65 78 74 | 45 76 65 6e 74 20 28 6b |WaitNext|Event (k|
|00001090| 65 79 44 6f 77 6e 4d 61 | 73 6b 2c 20 26 74 68 65 |eyDownMa|sk, &the|
|000010a0| 45 76 65 6e 74 2c 20 6b | 4d 61 78 53 6c 65 65 70 |Event, k|MaxSleep|
|000010b0| 2c 20 6e 69 6c 29 29 0d | 09 7b 0d 09 09 2f 2f 20 |, nil)).|.{...// |
|000010c0| 47 65 74 20 74 68 65 20 | 41 53 43 49 49 20 76 61 |Get the |ASCII va|
|000010d0| 6c 75 65 20 6f 66 20 74 | 68 65 20 6b 65 79 20 66 |lue of t|he key f|
|000010e0| 72 6f 6d 20 74 68 65 20 | 65 76 65 6e 74 20 72 65 |rom the |event re|
|000010f0| 63 6f 72 64 2e 2e 2e 20 | 0d 09 09 0d 09 09 6b 65 |cord... |......ke|
|00001100| 79 20 3d 20 74 68 65 45 | 76 65 6e 74 2e 6d 65 73 |y = theE|vent.mes|
|00001110| 73 61 67 65 20 26 20 63 | 68 61 72 43 6f 64 65 4d |sage & c|harCodeM|
|00001120| 61 73 6b 3b 0d 09 09 0d | 09 09 2f 2f 20 49 66 20 |ask;....|..// If |
|00001130| 74 68 65 20 6b 65 79 20 | 76 61 6c 75 65 20 69 73 |the key |value is|
|00001140| 20 65 71 75 61 6c 20 74 | 6f 20 74 68 61 74 20 6f | equal t|o that o|
|00001150| 66 20 74 68 65 20 70 65 | 72 69 6f 64 20 6b 65 79 |f the pe|riod key|
|00001160| 20 61 6e 64 0d 09 09 2f | 2f 20 74 68 65 20 63 6f | and.../|/ the co|
|00001170| 6d 6d 61 6e 64 20 6d 6f | 64 69 66 69 65 72 20 6b |mmand mo|difier k|
|00001180| 65 79 20 69 73 20 61 6c | 73 6f 20 62 65 69 6e 67 |ey is al|so being|
|00001190| 20 68 65 6c 64 20 64 6f | 77 6e 2c 20 74 68 65 6e | held do|wn, then|
|000011a0| 0d 09 09 2f 2f 20 73 65 | 74 20 72 65 73 75 6c 74 |...// se|t result|
|000011b0| 20 74 6f 20 74 72 75 65 | 2e 2e 2e 0d 09 0d 09 09 | to true|........|
|000011c0| 69 66 20 28 28 74 68 65 | 45 76 65 6e 74 2e 6d 6f |if ((the|Event.mo|
|000011d0| 64 69 66 69 65 72 73 20 | 26 20 63 6d 64 4b 65 79 |difiers |& cmdKey|
|000011e0| 29 20 26 26 20 6b 65 79 | 20 3d 3d 20 27 2e 27 29 |) && key| == '.')|
|000011f0| 20 20 20 2f 2f 20 63 6d | 64 2d 2e 20 0d 09 09 09 | // cm|d-. ....|
|00001200| 72 65 73 75 6c 74 20 3d | 20 74 72 75 65 3b 0d 09 |result =| true;..|
|00001210| 7d 0d 09 0d 09 72 65 74 | 75 72 6e 20 72 65 73 75 |}....ret|urn resu|
|00001220| 6c 74 3b 0d 7d 0d 0d 48 | 65 72 65 27 73 20 61 20 |lt;.}..H|ere's a |
|00001230| 73 6e 69 70 70 65 74 20 | 75 73 69 6e 67 20 74 68 |snippet |using th|
|00001240| 65 20 22 47 65 74 4b 65 | 79 73 22 20 74 6f 6f 6c |e "GetKe|ys" tool|
|00001250| 62 6f 78 20 63 61 6c 6c | 3a 0d 0d 42 6f 6f 6c 65 |box call|:..Boole|
|00001260| 61 6e 20 43 68 65 63 6b | 46 6f 72 43 6d 64 50 65 |an Check|ForCmdPe|
|00001270| 72 69 6f 64 20 28 76 6f | 69 64 29 0d 7b 0d 09 4b |riod (vo|id).{..K|
|00001280| 65 79 4d 61 70 09 09 6b | 65 79 73 3b 0d 0d 09 2f |eyMap..k|eys;.../|
|00001290| 2f 20 43 68 65 63 6b 20 | 74 6f 20 73 65 65 20 69 |/ Check |to see i|
|000012a0| 66 20 74 68 65 20 75 73 | 65 72 20 68 61 73 20 70 |f the us|er has p|
|000012b0| 72 65 73 73 65 64 20 63 | 6f 6d 6d 61 6e 64 2d 70 |ressed c|ommand-p|
|000012c0| 65 72 69 6f 64 20 6b 65 | 79 73 2e 2e 2e 0d 09 09 |eriod ke|ys......|
|000012d0| 0d 09 47 65 74 4b 65 79 | 73 20 28 6b 65 79 73 29 |..GetKey|s (keys)|
|000012e0| 3b 0d 09 69 66 28 6b 65 | 79 73 20 5b 31 5d 20 26 |;..if(ke|ys [1] &|
|000012f0| 20 30 78 30 30 38 30 30 | 30 30 30 29 09 2f 2f 20 | 0x00800|000).// |
|00001300| 63 6f 6d 6d 61 6e 64 0d | 09 7b 0d 09 09 47 65 74 |command.|.{...Get|
|00001310| 4b 65 79 73 20 28 6b 65 | 79 73 29 3b 0d 09 09 69 |Keys (ke|ys);...i|
|00001320| 66 28 6b 65 79 73 5b 31 | 5d 20 26 20 30 78 30 30 |f(keys[1|] & 0x00|
|00001330| 30 30 38 30 30 30 29 09 | 2f 2f 20 2e 20 28 70 65 |008000).|// . (pe|
|00001340| 72 69 6f 64 29 0d 09 09 | 7b 0d 09 09 09 46 6c 75 |riod)...|{....Flu|
|00001350| 73 68 45 76 65 6e 74 73 | 20 28 6d 44 6f 77 6e 4d |shEvents| (mDownM|
|00001360| 61 73 6b 20 2b 20 6d 55 | 70 4d 61 73 6b 2c 20 30 |ask + mU|pMask, 0|
|00001370| 29 3b 0d 09 09 09 72 65 | 74 75 72 6e 20 74 72 75 |);....re|turn tru|
|00001380| 65 3b 0d 09 09 7d 0d 09 | 7d 0d 09 65 6c 73 65 0d |e;...}..|}..else.|
|00001390| 09 09 72 65 74 75 72 6e | 20 66 61 6c 73 65 3b 0d |..return| false;.|
|000013a0| 7d 0d 0d 54 68 65 20 47 | 65 74 4b 65 79 73 20 63 |}..The G|etKeys c|
|000013b0| 61 6c 6c 20 77 69 6c 6c | 20 63 61 74 63 68 20 63 |all will| catch c|
|000013c0| 6d 64 2d 2e 20 74 68 61 | 74 20 69 73 20 69 6e 74 |md-. tha|t is int|
|000013d0| 65 6e 64 65 64 20 66 6f | 72 20 61 6e 79 6f 6e 65 |ended fo|r anyone|
|000013e0| 2c 20 73 6f 20 75 73 65 | 20 69 74 20 73 70 61 72 |, so use| it spar|
|000013f0| 69 6e 67 6c 79 2e 20 20 | 49 74 20 77 69 6c 6c 20 |ingly. |It will |
|00001400| 61 6c 73 6f 20 6e 6f 74 | 20 66 69 6c 74 65 72 20 |also not| filter |
|00001410| 74 68 65 20 63 6d 64 2d | 2e 0d 0d 0d 0d 44 6f 6e |the cmd-|.....Don|
|00001420| 27 74 20 50 61 6e 69 63 | 2c 0d 0d 0d 74 0d 2d 2d |'t Panic|,...t.--|
|00001430| 20 0d 20 20 7c 20 54 69 | 6d 6f 74 68 79 20 53 68 | . | Ti|mothy Sh|
|00001440| 65 72 62 75 72 6e 65 20 | 20 20 20 20 20 20 20 20 |erburne | |
|00001450| 20 20 20 20 20 20 20 20 | 20 20 20 7c 20 20 20 20 | | | |
|00001460| 20 20 20 20 20 20 20 20 | 20 20 20 53 6f 66 74 77 | | Softw|
|00001470| 61 72 65 20 45 6e 67 69 | 6e 65 65 72 20 7c 0d 20 |are Engi|neer |. |
|00001480| 20 7c 20 49 6e 74 65 72 | 6e 65 74 3a 20 20 74 69 | | Inter|net: ti|
|00001490| 6d 6f 74 68 79 73 40 75 | 6f 66 70 6f 72 74 2e 65 |mothys@u|ofport.e|
|000014a0| 64 75 20 20 20 20 20 20 | 7c 20 20 20 20 20 20 20 |du || |
|000014b0| 50 72 6f 6d 65 74 68 65 | 75 73 20 50 72 6f 64 75 |Promethe|us Produ|
|000014c0| 63 74 73 2c 20 49 6e 63 | 2e 20 7c 0d 20 20 7c 20 |cts, Inc|. |. | |
|000014d0| 41 70 70 6c 65 4c 69 6e | 6b 3a 20 44 36 31 36 34 |AppleLin|k: D6164|
|000014e0| 40 61 70 70 6c 65 6c 69 | 6e 6b 2e 61 70 70 6c 65 |@appleli|nk.apple|
|000014f0| 2e 63 6f 6d 20 7c 20 20 | 20 20 20 20 20 20 20 20 |.com | | |
|00001500| 20 20 20 20 20 20 20 20 | 31 2d 38 30 30 2d 34 37 | |1-800-47|
|00001510| 37 2d 33 34 37 33 20 7c | 0d 2a 41 6c 6c 20 63 6f |7-3473 ||.*All co|
|00001520| 6d 6d 65 6e 74 73 20 61 | 72 65 20 6d 79 20 6f 77 |mments a|re my ow|
|00001530| 6e 20 61 6e 64 20 69 6e | 20 6e 6f 20 77 61 79 20 |n and in| no way |
|00001540| 72 65 70 72 65 73 65 6e | 74 20 74 68 6f 73 65 20 |represen|t those |
|00001550| 6f 66 20 50 72 6f 6d 65 | 74 68 65 75 73 20 50 72 |of Prome|theus Pr|
|00001560| 6f 64 75 63 74 73 2a 0d | 0d 2b 2b 2b 2b 2b 2b 2b |oducts*.|.+++++++|
|00001570| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00001580| 2b 2b 2b 2b 0d 0d 3e 46 | 72 6f 6d 20 64 73 68 61 |++++..>F|rom dsha|
|00001590| 79 65 72 40 6e 65 74 63 | 6f 6d 2e 63 6f 6d 20 28 |yer@netc|om.com (|
|000015a0| 44 61 76 69 64 20 53 68 | 61 79 65 72 29 0d 44 61 |David Sh|ayer).Da|
|000015b0| 74 65 3a 20 57 65 64 2c | 20 32 34 20 41 75 67 20 |te: Wed,| 24 Aug |
|000015c0| 31 39 39 34 20 31 38 3a | 30 34 3a 35 30 20 47 4d |1994 18:|04:50 GM|
|000015d0| 54 0d 4f 72 67 61 6e 69 | 7a 61 74 69 6f 6e 3a 20 |T.Organi|zation: |
|000015e0| 4e 45 54 43 4f 4d 20 4f | 6e 2d 6c 69 6e 65 20 43 |NETCOM O|n-line C|
|000015f0| 6f 6d 6d 75 6e 69 63 61 | 74 69 6f 6e 20 53 65 72 |ommunica|tion Ser|
|00001600| 76 69 63 65 73 20 28 34 | 30 38 20 32 36 31 2d 34 |vices (4|08 261-4|
|00001610| 37 30 30 20 67 75 65 73 | 74 29 0d 0d 41 72 74 68 |700 gues|t)..Arth|
|00001620| 75 72 20 42 61 62 69 74 | 7a 20 28 61 72 74 68 75 |ur Babit|z (arthu|
|00001630| 72 5f 62 61 62 69 74 7a | 40 6d 65 6e 74 6f 72 67 |r_babitz|@mentorg|
|00001640| 2e 63 6f 6d 29 20 77 72 | 6f 74 65 3a 0d 3a 20 49 |.com) wr|ote:.: I|
|00001650| 27 76 65 20 62 65 65 6e | 20 74 72 79 69 6e 67 20 |'ve been| trying |
|00001660| 75 6e 73 75 63 63 65 73 | 73 66 75 6c 6c 79 20 74 |unsucces|sfully t|
|00001670| 6f 20 69 6d 70 6c 65 6d | 65 6e 74 20 61 20 22 63 |o implem|ent a "c|
|00001680| 6c 6f 76 65 72 2b 2e 22 | 20 69 6e 74 65 72 72 75 |lover+."| interru|
|00001690| 70 74 20 66 6f 72 20 61 | 0d 3a 20 63 6f 6d 70 75 |pt for a|.: compu|
|000016a0| 74 65 20 69 6e 74 65 6e | 73 69 76 65 20 70 61 72 |te inten|sive par|
|000016b0| 74 20 6f 66 20 61 6e 20 | 61 70 70 6c 69 63 61 74 |t of an |applicat|
|000016c0| 69 6f 6e 2e 20 20 49 20 | 77 6f 6e 27 74 20 62 6f |ion. I |won't bo|
|000016d0| 72 65 20 79 6f 75 20 77 | 69 74 68 20 61 20 6c 69 |re you w|ith a li|
|000016e0| 73 74 20 6f 66 0d 3a 20 | 74 68 69 6e 67 73 20 49 |st of.: |things I|
|000016f0| 27 76 65 20 74 72 69 65 | 64 20 77 68 69 63 68 20 |'ve trie|d which |
|00001700| 64 6f 6e 27 74 20 77 6f | 72 6b 2c 20 62 75 74 20 |don't wo|rk, but |
|00001710| 63 61 6e 20 73 6f 6d 65 | 6f 6e 65 20 70 6f 69 6e |can some|one poin|
|00001720| 74 20 6d 65 20 69 6e 20 | 74 68 65 20 72 69 67 68 |t me in |the righ|
|00001730| 74 0d 3a 20 64 69 72 65 | 63 74 69 6f 6e 3f 20 20 |t.: dire|ction? |
|00001740| 53 65 65 6d 73 20 6c 69 | 6b 65 20 74 68 65 72 65 |Seems li|ke there|
|00001750| 20 6d 75 73 74 20 62 65 | 20 61 20 73 74 61 6e 64 | must be| a stand|
|00001760| 61 72 64 2c 20 73 69 6d | 70 6c 65 20 73 6f 6c 75 |ard, sim|ple solu|
|00001770| 74 69 6f 6e 20 74 6f 20 | 74 68 69 73 0d 3a 20 70 |tion to |this.: p|
|00001780| 72 6f 62 6c 65 6d 2e 0d | 0d 54 68 65 20 73 69 6d |roblem..|.The sim|
|00001790| 70 6c 65 73 74 20 73 6f | 6c 75 74 69 6f 6e 20 69 |plest so|lution i|
|000017a0| 73 20 74 6f 20 73 69 6d | 70 6c 79 20 63 61 6c 6c |s to sim|ply call|
|000017b0| 20 57 61 69 74 4e 65 78 | 74 45 76 65 6e 74 20 65 | WaitNex|tEvent e|
|000017c0| 76 65 72 79 20 73 6f 20 | 6f 66 74 65 6e 2c 20 0d |very so |often, .|
|000017d0| 63 68 65 63 6b 69 6e 67 | 20 66 6f 72 20 6b 65 79 |checking| for key|
|000017e0| 64 6f 77 6e 20 65 76 65 | 6e 74 73 20 6f 66 20 63 |down eve|nts of c|
|000017f0| 6d 64 2d 70 65 72 69 6f | 64 2e 20 20 54 68 69 73 |md-perio|d. This|
|00001800| 20 69 73 20 70 6f 6c 6c | 69 6e 67 2c 20 6e 6f 74 | is poll|ing, not|
|00001810| 20 0d 69 6e 74 65 72 72 | 75 70 74 20 62 61 73 65 | .interr|upt base|
|00001820| 64 2e 20 20 42 75 74 20 | 74 68 61 74 27 73 20 74 |d. But |that's t|
|00001830| 68 65 20 63 6f 72 72 65 | 63 74 20 77 61 79 20 74 |he corre|ct way t|
|00001840| 6f 20 64 6f 20 69 74 20 | 6f 6e 20 61 20 4d 61 63 |o do it |on a Mac|
|00001850| 2e 0d 0d 44 61 76 69 64 | 0d 0d 0d 2b 2b 2b 2b 2b |...David|...+++++|
|00001860| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00001870| 2b 2b 2b 2b 2b 2b 0d 0d | 3e 46 72 6f 6d 20 72 68 |++++++..|>From rh|
|00001880| 6e 40 77 61 6c 74 7a 2e | 65 6e 67 72 2e 73 67 69 |n@waltz.|engr.sgi|
|00001890| 2e 63 6f 6d 20 28 52 6f | 6e 20 4e 69 63 68 6f 6c |.com (Ro|n Nichol|
|000018a0| 73 6f 6e 29 0d 44 61 74 | 65 3a 20 54 68 75 2c 20 |son).Dat|e: Thu, |
|000018b0| 32 35 20 41 75 67 20 31 | 39 39 34 20 30 32 3a 30 |25 Aug 1|994 02:0|
|000018c0| 32 3a 31 32 20 47 4d 54 | 0d 4f 72 67 61 6e 69 7a |2:12 GMT|.Organiz|
|000018d0| 61 74 69 6f 6e 3a 20 53 | 69 6c 69 63 6f 6e 20 47 |ation: S|ilicon G|
|000018e0| 72 61 70 68 69 63 73 2c | 20 49 6e 63 2e 2c 20 4d |raphics,| Inc., M|
|000018f0| 6f 75 6e 74 61 69 6e 20 | 56 69 65 77 2c 20 43 41 |ountain |View, CA|
|00001900| 0d 0d 49 6e 20 61 72 74 | 69 63 6c 65 20 3c 74 69 |..In art|icle <ti|
|00001910| 6d 6f 74 68 79 73 2e 37 | 37 37 37 34 35 31 38 36 |mothys.7|77745186|
|00001920| 40 68 6f 6f 64 3e 2c 0d | 54 69 6d 6f 74 68 79 20 |@hood>,.|Timothy |
|00001930| 53 68 65 72 62 75 72 6e | 65 20 3c 74 69 6d 6f 74 |Sherburn|e <timot|
|00001940| 68 79 73 40 68 6f 6f 64 | 2e 75 75 63 70 3e 20 77 |hys@hood|.uucp> w|
|00001950| 72 6f 74 65 3a 0d 3e 61 | 72 74 68 75 72 5f 62 61 |rote:.>a|rthur_ba|
|00001960| 62 69 74 7a 40 6d 65 6e | 74 6f 72 67 2e 63 6f 6d |bitz@men|torg.com|
|00001970| 20 28 41 72 74 68 75 72 | 20 42 61 62 69 74 7a 29 | (Arthur| Babitz)|
|00001980| 20 77 72 69 74 65 73 3a | 0d 3e 0d 3e 3e 49 27 76 | writes:|.>.>>I'v|
|00001990| 65 20 62 65 65 6e 20 74 | 72 79 69 6e 67 20 75 6e |e been t|rying un|
|000019a0| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 20 74 6f 20 |successf|ully to |
|000019b0| 69 6d 70 6c 65 6d 65 6e | 74 20 61 20 22 63 6c 6f |implemen|t a "clo|
|000019c0| 76 65 72 2b 2e 22 20 69 | 6e 74 65 72 72 75 70 74 |ver+." i|nterrupt|
|000019d0| 20 66 6f 72 20 61 0d 3e | 3e 63 6f 6d 70 75 74 65 | for a.>|>compute|
|000019e0| 20 69 6e 74 65 6e 73 69 | 76 65 20 70 61 72 74 20 | intensi|ve part |
|000019f0| 6f 66 20 61 6e 20 61 70 | 70 6c 69 63 61 74 69 6f |of an ap|plicatio|
|00001a00| 6e 2e 20 20 49 20 77 6f | 6e 27 74 20 62 6f 72 65 |n. I wo|n't bore|
|00001a10| 20 79 6f 75 20 77 69 74 | 68 20 61 20 6c 69 73 74 | you wit|h a list|
|00001a20| 20 6f 66 0d 3e 3e 74 68 | 69 6e 67 73 20 49 27 76 | of.>>th|ings I'v|
|00001a30| 65 20 74 72 69 65 64 20 | 77 68 69 63 68 20 64 6f |e tried |which do|
|00001a40| 6e 27 74 20 77 6f 72 6b | 2c 20 62 75 74 20 63 61 |n't work|, but ca|
|00001a50| 6e 20 73 6f 6d 65 6f 6e | 65 20 70 6f 69 6e 74 20 |n someon|e point |
|00001a60| 6d 65 20 69 6e 20 74 68 | 65 20 72 69 67 68 74 0d |me in th|e right.|
|00001a70| 3e 3e 64 69 72 65 63 74 | 69 6f 6e 3f 20 20 53 65 |>>direct|ion? Se|
|00001a80| 65 6d 73 20 6c 69 6b 65 | 20 74 68 65 72 65 20 6d |ems like| there m|
|00001a90| 75 73 74 20 62 65 20 61 | 20 73 74 61 6e 64 61 72 |ust be a| standar|
|00001aa0| 64 2c 20 73 69 6d 70 6c | 65 20 73 6f 6c 75 74 69 |d, simpl|e soluti|
|00001ab0| 6f 6e 20 74 6f 20 74 68 | 69 73 0d 3e 3e 70 72 6f |on to th|is.>>pro|
|00001ac0| 62 6c 65 6d 2e 0d 28 73 | 6e 69 70 29 0d 3e 48 65 |blem..(s|nip).>He|
|00001ad0| 72 65 27 73 20 61 20 73 | 6e 69 70 70 65 74 20 75 |re's a s|nippet u|
|00001ae0| 73 69 6e 67 20 57 61 69 | 74 4e 65 78 74 45 76 65 |sing Wai|tNextEve|
|00001af0| 6e 74 20 74 68 61 74 20 | 72 65 74 75 72 6e 73 20 |nt that |returns |
|00001b00| 61 20 22 74 72 75 65 22 | 20 69 66 20 63 6d 64 2d |a "true"| if cmd-|
|00001b10| 2e 20 2e 2e 2e 0d 3e 0d | 28 73 6e 69 70 29 0d 0d |. ....>.|(snip)..|
|00001b20| 41 20 70 72 6f 67 72 61 | 6d 20 68 61 73 20 74 6f |A progra|m has to|
|00001b30| 20 63 61 6c 6c 20 57 61 | 69 74 4e 65 78 74 45 76 | call Wa|itNextEv|
|00001b40| 65 6e 74 20 74 6f 20 63 | 6c 65 61 6e 6c 79 20 63 |ent to c|leanly c|
|00001b50| 68 65 63 6b 20 66 6f 72 | 20 61 20 6b 65 79 62 6f |heck for| a keybo|
|00001b60| 61 72 64 0d 61 62 6f 72 | 74 20 28 63 6f 6d 6d 61 |ard.abor|t (comma|
|00001b70| 6e 64 2d 70 65 72 69 6f | 64 29 2e 20 20 49 20 74 |nd-perio|d). I t|
|00001b80| 72 69 65 64 20 74 68 69 | 73 20 69 6e 20 61 6e 20 |ried thi|s in an |
|00001b90| 69 6e 6e 65 72 20 6c 6f | 6f 70 20 6f 66 20 61 20 |inner lo|op of a |
|00001ba0| 63 6f 6d 70 75 74 65 0d | 69 6e 74 65 6e 73 69 76 |compute.|intensiv|
|00001bb0| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 61 6e |e applic|ation an|
|00001bc0| 64 20 69 74 20 73 6c 6f | 77 65 64 20 64 6f 77 6e |d it slo|wed down|
|00001bd0| 20 74 68 65 20 63 6f 6d | 70 75 74 61 74 69 6f 6e | the com|putation|
|00001be0| 20 6e 6f 74 69 63 65 61 | 62 6c 79 2e 0d 49 20 68 | noticea|bly..I h|
|00001bf0| 61 64 20 74 6f 20 66 69 | 67 75 72 65 20 6f 75 74 |ad to fi|gure out|
|00001c00| 20 61 20 77 61 79 20 74 | 6f 20 70 6f 6c 6c 20 6f | a way t|o poll o|
|00001c10| 66 74 65 6e 20 65 6e 6f | 75 67 68 20 74 6f 20 6e |ften eno|ugh to n|
|00001c20| 6f 74 20 6d 61 6b 65 20 | 74 68 65 20 75 73 65 72 |ot make |the user|
|00001c30| 0d 69 6e 74 65 72 66 61 | 63 65 20 73 65 65 6d 20 |.interfa|ce seem |
|00001c40| 73 6c 75 67 67 69 73 68 | 2c 20 77 68 69 6c 65 20 |sluggish|, while |
|00001c50| 73 6c 6f 77 69 6e 67 20 | 63 61 6c 63 75 6c 61 74 |slowing |calculat|
|00001c60| 69 6f 6e 20 64 6f 77 6e | 20 6d 69 6e 69 6d 61 6c |ion down| minimal|
|00001c70| 6c 79 2e 0d 0d 57 68 61 | 74 20 49 20 6e 6f 77 20 |ly...Wha|t I now |
|00001c80| 64 6f 20 69 73 20 74 6f | 20 69 73 20 74 68 69 73 |do is to| is this|
|00001c90| 3a 0d 0d 46 69 72 73 74 | 20 49 20 69 6e 73 74 61 |:..First| I insta|
|00001ca0| 6c 6c 20 61 20 56 42 4c | 20 74 61 73 6b 20 77 68 |ll a VBL| task wh|
|00001cb0| 6f 73 65 20 6f 6e 6c 79 | 20 66 75 6e 63 74 69 6f |ose only| functio|
|00001cc0| 6e 20 69 73 20 74 6f 20 | 69 6e 63 72 65 6d 65 6e |n is to |incremen|
|00001cd0| 74 20 61 20 67 6c 6f 62 | 61 6c 0d 76 61 72 69 61 |t a glob|al.varia|
|00001ce0| 62 6c 65 2e 20 20 54 68 | 61 74 20 67 69 76 65 73 |ble. Th|at gives|
|00001cf0| 20 6d 65 20 61 20 74 69 | 63 6b 63 6f 75 6e 74 20 | me a ti|ckcount |
|00001d00| 76 61 72 69 61 62 6c 65 | 20 74 68 61 74 20 63 61 |variable| that ca|
|00001d10| 6e 20 62 65 20 72 65 61 | 64 20 77 69 74 68 6f 75 |n be rea|d withou|
|00001d20| 74 0d 61 20 66 75 6e 63 | 74 69 6f 6e 20 63 61 6c |t.a func|tion cal|
|00001d30| 6c 2e 20 20 59 6f 75 20 | 63 61 6e 20 61 6c 73 6f |l. You |can also|
|00001d40| 20 75 73 65 20 74 68 65 | 20 54 69 63 6b 43 6f 75 | use the| TickCou|
|00001d50| 6e 74 28 29 20 61 63 63 | 65 73 73 20 66 75 6e 63 |nt() acc|ess func|
|00001d60| 74 69 6f 6e 2e 0d 28 4f | 72 20 79 6f 75 20 63 61 |tion..(O|r you ca|
|00001d70| 6e 20 6a 75 73 74 20 75 | 73 65 20 74 68 65 20 6c |n just u|se the l|
|00001d80| 6f 77 6d 65 6d 20 67 6c | 6f 62 61 6c 20 54 69 63 |owmem gl|obal Tic|
|00001d90| 6b 73 20 61 74 20 24 30 | 31 36 41 20 69 66 20 79 |ks at $0|16A if y|
|00001da0| 6f 75 20 61 72 65 6e 27 | 74 0d 73 74 72 69 63 74 |ou aren'|t.strict|
|00001db0| 6c 79 20 66 6f 6c 6c 6f | 77 69 6e 67 20 41 70 70 |ly follo|wing App|
|00001dc0| 6c 65 27 73 20 67 75 69 | 64 65 6c 69 6e 65 73 2e |le's gui|delines.|
|00001dd0| 20 20 57 6f 75 6c 64 20 | 49 20 64 6f 20 74 68 61 | Would |I do tha|
|00001de0| 74 3f 20 3a 2d 29 0d 0d | 49 6e 20 6d 79 20 69 6e |t? :-)..|In my in|
|00001df0| 6e 65 72 20 6c 6f 6f 70 | 20 49 20 68 61 76 65 20 |ner loop| I have |
|00001e00| 63 6f 64 65 20 73 69 6d | 69 6c 61 72 20 74 6f 3a |code sim|ilar to:|
|00001e10| 09 2f 2a 20 69 6e 20 70 | 73 65 75 64 6f 20 63 6f |./* in p|seudo co|
|00001e20| 64 65 20 2a 2f 0d 0d 69 | 6e 74 20 43 6f 6d 70 75 |de */..i|nt Compu|
|00001e30| 74 65 49 6e 74 65 6e 73 | 69 76 65 46 75 6e 63 74 |teIntens|iveFunct|
|00001e40| 69 6f 6e 28 70 61 72 61 | 6d 65 74 65 72 73 20 2e |ion(para|meters .|
|00001e50| 2e 2e 29 0d 7b 0d 20 20 | 2e 2e 2e 0d 20 20 76 6f |..).{. |.... vo|
|00001e60| 6c 61 74 69 6c 65 20 6c | 6f 6e 67 20 69 6e 74 09 |latile l|ong int.|
|00001e70| 2a 6d 79 54 69 63 6b 43 | 6f 75 6e 74 50 74 72 3b |*myTickC|ountPtr;|
|00001e80| 0d 20 20 6c 6f 6e 67 20 | 69 6e 74 09 09 43 68 65 |. long |int..Che|
|00001e90| 63 6b 4e 6f 77 3b 0d 20 | 20 69 6e 74 09 09 09 4c |ckNow;. | int...L|
|00001ea0| 6f 63 61 6c 43 6f 75 6e | 74 65 72 3b 09 09 2f 2a |ocalCoun|ter;../*|
|00001eb0| 20 61 20 6c 6f 63 61 6c | 20 76 61 72 69 61 62 6c | a local| variabl|
|00001ec0| 65 20 2a 2f 0d 0d 20 20 | 6d 79 54 69 63 6b 43 6f |e */.. |myTickCo|
|00001ed0| 75 6e 74 50 74 72 20 3d | 20 26 73 6f 6d 65 5f 74 |untPtr =| &some_t|
|00001ee0| 69 63 6b 63 6f 75 6e 74 | 5f 67 6c 6f 62 61 6c 3b |ickcount|_global;|
|00001ef0| 20 09 2f 2a 20 70 6f 69 | 6e 74 20 61 74 20 74 69 | ./* poi|nt at ti|
|00001f00| 63 6b 63 6f 75 6e 74 20 | 2a 2f 0d 20 20 43 68 65 |ckcount |*/. Che|
|00001f10| 63 6b 4e 6f 77 20 3d 20 | 2a 6d 79 54 69 63 6b 43 |ckNow = |*myTickC|
|00001f20| 6f 75 6e 74 50 74 72 20 | 2b 20 36 3b 09 09 2f 2a |ountPtr |+ 6;../*|
|00001f30| 20 65 76 65 72 79 20 31 | 30 74 68 20 6f 66 20 61 | every 1|0th of a|
|00001f40| 20 73 65 63 6f 6e 64 20 | 2a 2f 0d 20 20 4c 6f 63 | second |*/. Loc|
|00001f50| 61 6c 43 6f 75 6e 74 65 | 72 20 3d 20 32 35 3b 0d |alCounte|r = 25;.|
|00001f60| 20 20 2e 2e 2e 0d 0d 20 | 20 66 6f 72 20 28 69 3d | ..... | for (i=|
|00001f70| 31 2c 69 3c 31 30 30 30 | 30 30 30 30 30 30 3b 69 |1,i<1000|000000;i|
|00001f80| 2b 2b 29 20 7b 0d 0d 20 | 20 20 20 2e 2e 2e 20 20 |++) {.. | ... |
|00001f90| 2f 2a 20 63 6f 6d 70 75 | 74 65 20 69 6e 74 65 6e |/* compu|te inten|
|00001fa0| 73 69 76 65 20 69 6e 6e | 65 72 20 6c 6f 6f 70 20 |sive inn|er loop |
|00001fb0| 73 74 75 66 66 20 74 68 | 61 74 20 67 6f 65 73 20 |stuff th|at goes |
|00001fc0| 6f 6e 20 66 6f 72 65 76 | 65 72 20 2a 2f 0d 0d 20 |on forev|er */.. |
|00001fd0| 20 20 20 69 66 20 28 2d | 2d 4c 6f 63 61 6c 43 6f | if (-|-LocalCo|
|00001fe0| 75 6e 74 65 72 20 3c 3d | 20 30 29 20 7b 0d 20 20 |unter <=| 0) {. |
|00001ff0| 20 20 20 20 69 66 20 28 | 2a 6d 79 54 69 63 6b 43 | if (|*myTickC|
|00002000| 6f 75 6e 74 50 74 72 20 | 3e 3d 20 43 68 65 63 6b |ountPtr |>= Check|
|00002010| 4e 6f 77 29 20 7b 0d 09 | 66 6c 61 67 20 3d 20 43 |Now) {..|flag = C|
|00002020| 68 65 63 6b 46 6f 72 41 | 62 6f 72 74 45 76 65 6e |heckForA|bortEven|
|00002030| 74 28 29 3b 09 2f 2a 20 | 77 72 61 70 70 65 72 20 |t();./* |wrapper |
|00002040| 66 6f 72 20 57 61 69 74 | 4e 65 78 74 45 76 65 6e |for Wait|NextEven|
|00002050| 74 20 2a 2f 0d 09 69 66 | 20 28 66 6c 61 67 29 0d |t */..if| (flag).|
|00002060| 20 20 09 20 20 72 65 74 | 75 72 6e 28 6b 53 6f 6d | . ret|urn(kSom|
|00002070| 65 45 72 72 6f 72 43 6f | 64 65 29 3b 09 2f 2a 20 |eErrorCo|de);./* |
|00002080| 61 62 6f 72 74 20 63 61 | 6c 63 75 6c 61 74 69 6f |abort ca|lculatio|
|00002090| 6e 09 2a 2f 0d 09 09 09 | 09 09 2f 2a 20 6f 72 20 |n.*/....|../* or |
|000020a0| 61 6c 74 65 72 6e 61 74 | 69 76 65 6c 79 20 6a 75 |alternat|ively ju|
|000020b0| 73 74 20 62 72 65 61 6b | 20 2a 2f 0d 09 65 6c 73 |st break| */..els|
|000020c0| 65 0d 09 20 20 43 68 65 | 63 6b 4e 6f 77 20 3d 20 |e.. Che|ckNow = |
|000020d0| 2a 6d 79 54 69 63 6b 43 | 6f 75 6e 74 50 74 72 20 |*myTickC|ountPtr |
|000020e0| 2b 20 36 3b 0d 20 20 20 | 20 20 20 7d 0d 20 20 20 |+ 6;. | }. |
|000020f0| 20 20 20 4c 6f 63 61 6c | 43 6f 75 6e 74 65 72 20 | Local|Counter |
|00002100| 3d 20 32 35 3b 09 09 2f | 2a 20 6f 72 20 73 6f 6d |= 25;../|* or som|
|00002110| 65 20 73 75 63 68 20 76 | 61 6c 75 65 09 2a 2f 0d |e such v|alue.*/.|
|00002120| 20 20 20 20 7d 0d 20 20 | 7d 0d 20 20 2e 2e 2e 0d | }. |}. ....|
|00002130| 20 20 72 65 74 75 72 6e | 28 6b 46 69 6e 69 73 68 | return|(kFinish|
|00002140| 65 64 43 61 6c 63 75 6c | 61 74 69 6e 67 29 3b 0d |edCalcul|ating);.|
|00002150| 7d 0d 0d 45 76 65 72 79 | 20 74 69 6d 65 20 74 68 |}..Every| time th|
|00002160| 72 6f 75 67 68 20 74 68 | 65 20 6c 6f 6f 70 2c 20 |rough th|e loop, |
|00002170| 74 68 65 20 63 6f 64 65 | 20 64 6f 65 73 20 6f 6e |the code| does on|
|00002180| 65 20 6c 6f 63 61 6c 20 | 76 61 72 69 61 62 6c 65 |e local |variable|
|00002190| 20 64 65 63 72 65 6d 65 | 6e 74 0d 61 6e 64 20 63 | decreme|nt.and c|
|000021a0| 6f 6d 70 61 72 65 2e 20 | 20 45 76 65 72 79 20 32 |ompare. | Every 2|
|000021b0| 35 74 68 20 74 69 6d 65 | 2c 20 74 68 65 20 63 6f |5th time|, the co|
|000021c0| 64 65 20 64 6f 65 73 20 | 6f 6e 65 20 67 6c 6f 62 |de does |one glob|
|000021d0| 61 6c 20 76 61 72 69 61 | 62 6c 65 0d 28 70 72 6f |al varia|ble.(pro|
|000021e0| 62 61 62 6c 79 20 75 6e | 63 61 63 68 65 64 20 61 |bably un|cached a|
|000021f0| 6e 64 20 74 68 75 73 20 | 73 6c 6f 77 65 72 29 20 |nd thus |slower) |
|00002200| 6c 6f 61 64 20 61 6e 64 | 20 63 6f 6d 70 61 72 65 |load and| compare|
|00002210| 2e 20 20 45 76 65 72 79 | 20 31 30 74 68 20 6f 66 |. Every| 10th of|
|00002220| 20 61 0d 73 65 63 6f 6e | 64 2c 20 74 68 65 20 63 | a.secon|d, the c|
|00002230| 6f 64 65 20 70 6f 6c 6c | 73 20 74 68 65 20 65 76 |ode poll|s the ev|
|00002240| 65 6e 74 20 71 75 65 75 | 65 20 66 6f 72 20 61 62 |ent queu|e for ab|
|00002250| 6f 72 74 2c 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |ort, app|lication|
|00002260| 20 73 77 69 74 63 68 65 | 73 2c 20 65 74 63 2e 0d | switche|s, etc..|
|00002270| 0d 54 68 65 20 22 36 22 | 20 61 6e 64 20 22 32 35 |.The "6"| and "25|
|00002280| 22 20 61 72 65 20 6a 75 | 73 74 20 65 78 61 6d 70 |" are ju|st examp|
|00002290| 6c 65 20 76 61 6c 75 65 | 73 2e 20 20 59 6f 75 20 |le value|s. You |
|000022a0| 6d 69 67 68 74 20 77 61 | 6e 74 20 74 6f 20 63 68 |might wa|nt to ch|
|000022b0| 6f 6f 73 65 20 74 68 65 | 0d 69 6e 69 74 69 61 6c |oose the|.initial|
|000022c0| 20 6c 6f 6f 70 20 63 6f | 75 6e 74 65 72 20 76 61 | loop co|unter va|
|000022d0| 6c 75 65 20 62 61 73 65 | 64 20 6f 6e 20 61 70 70 |lue base|d on app|
|000022e0| 6c 69 63 61 74 69 6f 6e | 20 74 75 6e 69 6e 67 20 |lication| tuning |
|000022f0| 61 6e 64 20 74 68 65 20 | 70 72 6f 63 65 73 73 6f |and the |processo|
|00002300| 72 0d 73 70 65 65 64 20 | 6f 66 20 74 68 65 20 4d |r.speed |of the M|
|00002310| 61 63 20 6f 6e 20 77 68 | 69 63 68 20 74 68 65 20 |ac on wh|ich the |
|00002320| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 69 73 20 72 |applicat|ion is r|
|00002330| 75 6e 6e 69 6e 67 2e 0d | 0d 2d 20 2d 0d 52 6f 6e |unning..|.- -.Ron|
|00002340| 61 6c 64 20 48 2e 20 4e | 69 63 68 6f 6c 73 6f 6e |ald H. N|icholson|
|00002350| 2c 20 4a 72 2e 09 72 68 | 6e 40 65 6e 67 72 2e 73 |, Jr..rh|n@engr.s|
|00002360| 67 69 2e 63 6f 6d 2c 20 | 72 68 6e 40 6e 65 74 63 |gi.com, |rhn@netc|
|00002370| 6f 6d 2e 63 6f 6d 2c 20 | 4e 36 59 57 55 0d 23 69 |om.com, |N6YWU.#i|
|00002380| 6e 63 6c 75 64 65 20 3c | 63 61 6e 6f 6e 69 63 61 |nclude <|canonica|
|00002390| 6c 2e 64 69 73 63 6c 61 | 69 6d 65 72 3e 20 09 2f |l.discla|imer> ./|
|000023a0| 2f 20 49 20 73 70 65 61 | 6b 20 6f 6e 6c 79 20 66 |/ I spea|k only f|
|000023b0| 6f 72 20 6d 79 73 65 6c | 66 2c 20 65 74 63 2e 0d |or mysel|f, etc..|
|000023c0| 0d 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |.+++++++|++++++++|
|000023d0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 0d 0d 3e 46 |++++++++|++++..>F|
|000023e0| 72 6f 6d 20 72 61 64 69 | 78 69 6e 63 40 61 6f 6c |rom radi|xinc@aol|
|000023f0| 2e 63 6f 6d 20 28 52 61 | 64 69 78 49 6e 63 29 0d |.com (Ra|dixInc).|
|00002400| 44 61 74 65 3a 20 32 35 | 20 41 75 67 20 31 39 39 |Date: 25| Aug 199|
|00002410| 34 20 30 31 3a 31 31 3a | 31 30 20 2d 30 34 30 30 |4 01:11:|10 -0400|
|00002420| 0d 4f 72 67 61 6e 69 7a | 61 74 69 6f 6e 3a 20 41 |.Organiz|ation: A|
|00002430| 6d 65 72 69 63 61 20 4f | 6e 6c 69 6e 65 2c 20 49 |merica O|nline, I|
|00002440| 6e 63 2e 20 28 31 2d 38 | 30 30 2d 38 32 37 2d 36 |nc. (1-8|00-827-6|
|00002450| 33 36 34 29 0d 0d 49 6e | 20 61 72 74 69 63 6c 65 |364)..In| article|
|00002460| 20 3c 43 76 32 49 7a 6f | 2e 41 6f 31 40 6f 64 69 | <Cv2Izo|.Ao1@odi|
|00002470| 6e 2e 63 6f 72 70 2e 73 | 67 69 2e 63 6f 6d 3e 2c |n.corp.s|gi.com>,|
|00002480| 20 72 68 6e 40 77 61 6c | 74 7a 2e 65 6e 67 72 2e | rhn@wal|tz.engr.|
|00002490| 73 67 69 2e 63 6f 6d 20 | 28 52 6f 6e 0d 4e 69 63 |sgi.com |(Ron.Nic|
|000024a0| 68 6f 6c 73 6f 6e 29 20 | 77 72 69 74 65 73 3a 0d |holson) |writes:.|
|000024b0| 0d 3c 3c 0d 41 20 70 72 | 6f 67 72 61 6d 20 68 61 |.<<.A pr|ogram ha|
|000024c0| 73 20 74 6f 20 63 61 6c | 6c 20 57 61 69 74 4e 65 |s to cal|l WaitNe|
|000024d0| 78 74 45 76 65 6e 74 20 | 74 6f 20 63 6c 65 61 6e |xtEvent |to clean|
|000024e0| 6c 79 20 63 68 65 63 6b | 20 66 6f 72 20 61 20 6b |ly check| for a k|
|000024f0| 65 79 62 6f 61 72 64 0d | 61 62 6f 72 74 20 28 63 |eyboard.|abort (c|
|00002500| 6f 6d 6d 61 6e 64 2d 70 | 65 72 69 6f 64 29 2e 20 |ommand-p|eriod). |
|00002510| 20 49 20 74 72 69 65 64 | 20 74 68 69 73 20 69 6e | I tried| this in|
|00002520| 20 61 6e 20 69 6e 6e 65 | 72 20 6c 6f 6f 70 20 6f | an inne|r loop o|
|00002530| 66 20 61 20 63 6f 6d 70 | 75 74 65 0d 69 6e 74 65 |f a comp|ute.inte|
|00002540| 6e 73 69 76 65 20 61 70 | 70 6c 69 63 61 74 69 6f |nsive ap|plicatio|
|00002550| 6e 20 61 6e 64 20 69 74 | 20 73 6c 6f 77 65 64 20 |n and it| slowed |
|00002560| 64 6f 77 6e 20 74 68 65 | 20 63 6f 6d 70 75 74 61 |down the| computa|
|00002570| 74 69 6f 6e 20 6e 6f 74 | 69 63 65 61 62 6c 79 2e |tion not|iceably.|
|00002580| 0d 49 20 68 61 64 20 74 | 6f 20 66 69 67 75 72 65 |.I had t|o figure|
|00002590| 20 6f 75 74 20 61 20 77 | 61 79 20 74 6f 20 70 6f | out a w|ay to po|
|000025a0| 6c 6c 20 6f 66 74 65 6e | 20 65 6e 6f 75 67 68 20 |ll often| enough |
|000025b0| 74 6f 20 6e 6f 74 20 6d | 61 6b 65 20 74 68 65 20 |to not m|ake the |
|000025c0| 75 73 65 72 0d 69 6e 74 | 65 72 66 61 63 65 20 73 |user.int|erface s|
|000025d0| 65 65 6d 20 73 6c 75 67 | 67 69 73 68 2c 20 77 68 |eem slug|gish, wh|
|000025e0| 69 6c 65 20 73 6c 6f 77 | 69 6e 67 20 63 61 6c 63 |ile slow|ing calc|
|000025f0| 75 6c 61 74 69 6f 6e 20 | 64 6f 77 6e 20 6d 69 6e |ulation |down min|
|00002600| 69 6d 61 6c 6c 79 2e 0d | 3e 3e 0d 0d 41 20 70 72 |imally..|>>..A pr|
|00002610| 6f 67 72 61 6d 20 68 61 | 73 20 74 6f 20 63 61 6c |ogram ha|s to cal|
|00002620| 6c 20 57 61 69 74 4e 65 | 78 74 45 76 65 6e 74 20 |l WaitNe|xtEvent |
|00002630| 74 6f 20 63 6c 65 61 6e | 6c 79 20 64 6f 20 61 20 |to clean|ly do a |
|00002640| 6c 6f 74 20 6f 66 20 74 | 68 69 6e 67 73 2e 20 49 |lot of t|hings. I|
|00002650| 66 20 79 6f 75 0d 61 72 | 65 6e 27 74 20 63 68 65 |f you.ar|en't che|
|00002660| 63 6b 69 6e 67 20 65 76 | 65 6e 74 73 20 79 6f 75 |cking ev|ents you|
|00002670| 20 61 72 65 20 68 6f 67 | 67 69 6e 67 20 74 68 65 | are hog|ging the|
|00002680| 20 6d 61 63 68 69 6e 65 | 20 61 6e 64 20 6e 6f 74 | machine| and not|
|00002690| 20 6c 65 74 74 69 6e 67 | 20 6f 74 68 65 72 0d 61 | letting| other.a|
|000026a0| 70 70 73 20 68 61 76 65 | 20 74 69 6d 65 2e 20 41 |pps have| time. A|
|000026b0| 6e 64 20 77 68 61 74 20 | 64 6f 20 79 6f 75 20 6d |nd what |do you m|
|000026c0| 65 61 6e 20 22 6e 6f 74 | 20 6d 61 6b 65 20 74 68 |ean "not| make th|
|000026d0| 65 20 75 73 65 72 20 69 | 6e 74 65 72 66 61 63 65 |e user i|nterface|
|000026e0| 20 73 65 65 6d 0d 73 6c | 75 67 67 69 73 68 3f 22 | seem.sl|uggish?"|
|000026f0| 20 57 68 61 74 20 75 73 | 65 72 20 69 6e 74 65 72 | What us|er inter|
|00002700| 66 61 63 65 20 64 6f 20 | 79 6f 75 20 68 61 76 65 |face do |you have|
|00002710| 20 77 68 65 6e 20 79 6f | 75 20 61 72 65 6e 27 74 | when yo|u aren't|
|00002720| 20 63 68 65 63 6b 69 6e | 67 20 66 6f 72 0d 65 76 | checkin|g for.ev|
|00002730| 65 6e 74 73 3f 0d 0d 3c | 3c 0d 46 69 72 73 74 20 |ents?..<|<.First |
|00002740| 49 20 69 6e 73 74 61 6c | 6c 20 61 20 56 42 4c 20 |I instal|l a VBL |
|00002750| 74 61 73 6b 20 77 68 6f | 73 65 20 6f 6e 6c 79 20 |task who|se only |
|00002760| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 74 6f 20 69 |function| is to i|
|00002770| 6e 63 72 65 6d 65 6e 74 | 20 61 20 67 6c 6f 62 61 |ncrement| a globa|
|00002780| 6c 0d 76 61 72 69 61 62 | 6c 65 2e 20 20 54 68 61 |l.variab|le. Tha|
|00002790| 74 20 67 69 76 65 73 20 | 6d 65 20 61 20 74 69 63 |t gives |me a tic|
|000027a0| 6b 63 6f 75 6e 74 20 76 | 61 72 69 61 62 6c 65 20 |kcount v|ariable |
|000027b0| 74 68 61 74 20 63 61 6e | 20 62 65 20 72 65 61 64 |that can| be read|
|000027c0| 20 77 69 74 68 6f 75 74 | 0d 61 20 66 75 6e 63 74 | without|.a funct|
|000027d0| 69 6f 6e 20 63 61 6c 6c | 2e 20 20 59 6f 75 20 63 |ion call|. You c|
|000027e0| 61 6e 20 61 6c 73 6f 20 | 75 73 65 20 74 68 65 20 |an also |use the |
|000027f0| 54 69 63 6b 43 6f 75 6e | 74 28 29 20 61 63 63 65 |TickCoun|t() acce|
|00002800| 73 73 20 66 75 6e 63 74 | 69 6f 6e 2e 0d 28 4f 72 |ss funct|ion..(Or|
|00002810| 20 79 6f 75 20 63 61 6e | 20 6a 75 73 74 20 75 73 | you can| just us|
|00002820| 65 20 74 68 65 20 6c 6f | 77 6d 65 6d 20 67 6c 6f |e the lo|wmem glo|
|00002830| 62 61 6c 20 54 69 63 6b | 73 20 61 74 20 24 30 31 |bal Tick|s at $01|
|00002840| 36 41 20 69 66 20 79 6f | 75 20 61 72 65 6e 27 74 |6A if yo|u aren't|
|00002850| 0d 73 74 72 69 63 74 6c | 79 20 66 6f 6c 6c 6f 77 |.strictl|y follow|
|00002860| 69 6e 67 20 41 70 70 6c | 65 27 73 20 67 75 69 64 |ing Appl|e's guid|
|00002870| 65 6c 69 6e 65 73 2e 20 | 20 57 6f 75 6c 64 20 49 |elines. | Would I|
|00002880| 20 64 6f 20 74 68 61 74 | 3f 20 3a 2d 29 0d 3e 3e | do that|? :-).>>|
|00002890| 0d 0d 54 68 69 73 20 69 | 73 20 73 69 6c 6c 79 2e |..This i|s silly.|
|000028a0| 20 4a 75 73 74 20 63 61 | 6c 6c 20 54 69 63 6b 43 | Just ca|ll TickC|
|000028b0| 6f 75 6e 74 28 29 2c 20 | 6f 72 20 69 66 20 79 6f |ount(), |or if yo|
|000028c0| 75 20 68 61 76 65 20 74 | 6f 2c 20 6a 75 73 74 20 |u have t|o, just |
|000028d0| 6c 6f 6f 6b 20 61 74 0d | 54 69 63 6b 73 2e 20 59 |look at.|Ticks. Y|
|000028e0| 6f 75 20 61 72 65 20 6f | 76 65 72 6c 79 20 77 6f |ou are o|verly wo|
|000028f0| 72 72 69 65 64 20 61 62 | 6f 75 74 20 70 65 72 66 |rried ab|out perf|
|00002900| 6f 72 6d 61 6e 63 65 2c | 20 79 65 74 20 79 6f 75 |ormance,| yet you|
|00002910| 20 69 6e 73 74 61 6c 6c | 20 61 20 56 42 4c 0d 74 | install| a VBL.t|
|00002920| 61 73 6b 20 74 68 61 74 | 20 64 6f 65 73 20 74 68 |ask that| does th|
|00002930| 65 20 73 61 6d 65 20 74 | 68 69 6e 67 20 61 73 20 |e same t|hing as |
|00002940| 61 6e 20 65 78 69 73 74 | 69 6e 67 20 56 42 4c 20 |an exist|ing VBL |
|00002950| 74 61 73 6b 20 28 68 6f | 77 20 64 6f 20 79 6f 75 |task (ho|w do you|
|00002960| 20 74 68 69 6e 6b 0d 54 | 69 63 6b 73 20 67 65 74 | think.T|icks get|
|00002970| 73 20 75 70 64 61 74 65 | 64 20 69 6e 20 74 68 65 |s update|d in the|
|00002980| 20 66 69 72 73 74 20 70 | 6c 61 63 65 3f 29 2e 20 | first p|lace?). |
|00002990| 59 6f 75 20 63 61 6e 20 | 75 73 65 20 61 6e 79 20 |You can |use any |
|000029a0| 44 4f 43 55 4d 45 4e 54 | 45 44 0d 6c 6f 77 2d 6d |DOCUMENT|ED.low-m|
|000029b0| 65 6d 6f 72 79 20 67 6c | 6f 62 61 6c 73 2c 20 6c |emory gl|obals, l|
|000029c0| 69 6b 65 20 54 69 63 6b | 73 2c 20 77 69 74 68 6f |ike Tick|s, witho|
|000029d0| 75 74 20 67 65 74 74 69 | 6e 67 20 69 6e 20 74 72 |ut getti|ng in tr|
|000029e0| 6f 75 62 6c 65 2e 20 43 | 65 72 74 61 69 6e 6c 79 |ouble. C|ertainly|
|000029f0| 0d 67 69 76 65 6e 20 74 | 68 65 20 63 68 6f 69 63 |.given t|he choic|
|00002a00| 65 20 62 65 74 77 65 65 | 6e 20 74 68 61 74 20 61 |e betwee|n that a|
|00002a10| 6e 64 20 69 6e 73 74 61 | 6c 6c 69 6e 67 20 61 20 |nd insta|lling a |
|00002a20| 56 42 4c 2c 20 44 54 53 | 20 77 6f 75 6c 64 20 61 |VBL, DTS| would a|
|00002a30| 64 76 69 73 65 20 74 68 | 65 0d 66 6f 72 6d 65 72 |dvise th|e.former|
|00002a40| 2e 0d 0d 41 73 20 66 6f | 72 20 74 68 65 20 63 6f |...As fo|r the co|
|00002a50| 64 65 20 73 61 6d 70 6c | 65 2c 20 77 68 79 20 6e |de sampl|e, why n|
|00002a60| 6f 74 20 63 61 6c 6c 20 | 45 76 65 6e 74 41 76 61 |ot call |EventAva|
|00002a70| 69 6c 20 70 65 72 69 6f | 64 69 63 61 6c 6c 79 20 |il perio|dically |
|00002a80| 77 69 74 68 20 61 6e 20 | 65 76 65 6e 74 0d 6d 61 |with an |event.ma|
|00002a90| 73 6b 20 74 68 61 74 20 | 69 67 6e 6f 72 65 73 20 |sk that |ignores |
|00002aa0| 65 76 65 6e 74 73 20 79 | 6f 75 20 64 6f 6e 27 74 |events y|ou don't|
|00002ab0| 20 63 61 72 65 20 61 62 | 6f 75 74 3f 20 54 68 61 | care ab|out? Tha|
|00002ac0| 74 20 77 61 79 20 79 6f | 75 20 77 6f 6e 27 74 20 |t way yo|u won't |
|00002ad0| 65 6e 64 20 75 70 0d 77 | 69 74 68 20 61 6e 20 65 |end up.w|ith an e|
|00002ae0| 76 65 6e 74 20 6c 6f 6f | 70 20 69 6e 73 69 64 65 |vent loo|p inside|
|00002af0| 20 79 6f 75 72 20 63 6f | 6d 70 75 74 65 2d 69 6e | your co|mpute-in|
|00002b00| 74 65 6e 73 69 76 65 20 | 6c 6f 6f 70 20 61 6e 64 |tensive |loop and|
|00002b10| 20 28 70 72 65 73 75 6d | 61 62 6c 79 29 0d 61 6e | (presum|ably).an|
|00002b20| 6f 74 68 65 72 20 6f 6e | 65 20 69 6e 20 79 6f 75 |other on|e in you|
|00002b30| 72 20 6d 61 69 6e 20 70 | 72 6f 67 72 61 6d 2e 20 |r main p|rogram. |
|00002b40| 28 44 54 53 20 77 69 6c | 6c 20 63 65 72 74 61 69 |(DTS wil|l certai|
|00002b50| 6e 6c 79 20 66 72 6f 77 | 6e 20 6f 6e 20 63 61 6c |nly frow|n on cal|
|00002b60| 6c 69 6e 67 0d 57 61 69 | 74 4e 65 78 74 45 76 65 |ling.Wai|tNextEve|
|00002b70| 6e 74 20 66 72 6f 6d 20 | 6d 6f 72 65 20 74 68 61 |nt from |more tha|
|00002b80| 6e 20 6f 6e 65 20 70 6c | 61 63 65 20 69 6e 20 79 |n one pl|ace in y|
|00002b90| 6f 75 72 20 70 72 6f 67 | 72 61 6d 29 2e 20 41 6e |our prog|ram). An|
|00002ba0| 64 20 72 61 74 68 65 72 | 20 74 68 61 6e 0d 75 73 |d rather| than.us|
|00002bb0| 69 6e 67 20 54 69 63 6b | 73 20 61 6e 64 20 74 68 |ing Tick|s and th|
|00002bc0| 65 20 6c 6f 63 61 6c 20 | 63 6f 75 6e 74 65 72 2c |e local |counter,|
|00002bd0| 20 75 73 65 20 61 20 6d | 6f 64 75 6c 6f 20 63 61 | use a m|odulo ca|
|00002be0| 6c 63 75 6c 61 74 69 6f | 6e 20 6f 6e 20 79 6f 75 |lculatio|n on you|
|00002bf0| 72 20 6c 6f 6f 70 0d 76 | 61 72 69 61 62 6c 65 3b |r loop.v|ariable;|
|00002c00| 20 65 2e 67 2e 20 63 68 | 65 63 6b 20 66 6f 72 20 | e.g. ch|eck for |
|00002c10| 61 6e 20 65 76 65 6e 74 | 20 65 76 65 72 79 20 31 |an event| every 1|
|00002c20| 30 2c 30 30 30 20 69 74 | 65 72 61 74 69 6f 6e 73 |0,000 it|erations|
|00002c30| 20 6f 72 20 73 6f 2e 0d | 0d 4d 61 6b 65 20 69 74 | or so..|.Make it|
|00002c40| 20 77 6f 72 6b 20 66 69 | 72 73 74 2c 20 6f 70 74 | work fi|rst, opt|
|00002c50| 69 6d 69 7a 65 20 74 68 | 65 20 73 6c 6f 77 20 70 |imize th|e slow p|
|00002c60| 61 72 74 73 20 6c 61 74 | 65 72 20 5b 61 66 74 65 |arts lat|er [afte|
|00002c70| 72 20 69 64 65 6e 74 69 | 66 79 69 6e 67 20 74 68 |r identi|fying th|
|00002c80| 65 0d 73 6c 6f 77 20 70 | 61 72 74 73 5d 2e 0d 0d |e.slow p|arts]...|
|00002c90| 47 72 65 67 6f 72 79 20 | 4a 6f 72 67 65 6e 73 65 |Gregory |Jorgense|
|00002ca0| 6e 0d 52 61 64 69 78 20 | 43 6f 6e 73 75 6c 74 69 |n.Radix |Consulti|
|00002cb0| 6e 67 20 49 6e 63 2e 0d | 0d 2b 2b 2b 2b 2b 2b 2b |ng Inc..|.+++++++|
|00002cc0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00002cd0| 2b 2b 2b 2b 0d 0d 3e 46 | 72 6f 6d 20 72 68 6e 40 |++++..>F|rom rhn@|
|00002ce0| 77 61 6c 74 7a 2e 65 6e | 67 72 2e 73 67 69 2e 63 |waltz.en|gr.sgi.c|
|00002cf0| 6f 6d 20 28 52 6f 6e 20 | 4e 69 63 68 6f 6c 73 6f |om (Ron |Nicholso|
|00002d00| 6e 29 0d 44 61 74 65 3a | 20 54 68 75 2c 20 32 35 |n).Date:| Thu, 25|
|00002d10| 20 41 75 67 20 31 39 39 | 34 20 31 37 3a 33 31 3a | Aug 199|4 17:31:|
|00002d20| 31 36 20 47 4d 54 0d 4f | 72 67 61 6e 69 7a 61 74 |16 GMT.O|rganizat|
|00002d30| 69 6f 6e 3a 20 53 69 6c | 69 63 6f 6e 20 47 72 61 |ion: Sil|icon Gra|
|00002d40| 70 68 69 63 73 2c 20 49 | 6e 63 2e 2c 20 4d 6f 75 |phics, I|nc., Mou|
|00002d50| 6e 74 61 69 6e 20 56 69 | 65 77 2c 20 43 41 0d 0d |ntain Vi|ew, CA..|
|00002d60| 49 6e 20 61 72 74 69 63 | 6c 65 20 3c 33 33 68 39 |In artic|le <33h9|
|00002d70| 35 65 24 65 6b 6e 40 73 | 65 61 72 63 68 30 31 2e |5e$ekn@s|earch01.|
|00002d80| 6e 65 77 73 2e 61 6f 6c | 2e 63 6f 6d 3e 2c 0d 52 |news.aol|.com>,.R|
|00002d90| 61 64 69 78 49 6e 63 20 | 3c 72 61 64 69 78 69 6e |adixInc |<radixin|
|00002da0| 63 40 61 6f 6c 2e 63 6f | 6d 3e 20 77 72 6f 74 65 |c@aol.co|m> wrote|
|00002db0| 3a 0d 3e 0d 3e 41 73 20 | 66 6f 72 20 74 68 65 20 |:.>.>As |for the |
|00002dc0| 63 6f 64 65 20 73 61 6d | 70 6c 65 2c 20 77 68 79 |code sam|ple, why|
|00002dd0| 20 6e 6f 74 20 63 61 6c | 6c 20 45 76 65 6e 74 41 | not cal|l EventA|
|00002de0| 76 61 69 6c 20 70 65 72 | 69 6f 64 69 63 61 6c 6c |vail per|iodicall|
|00002df0| 79 20 77 69 74 68 20 61 | 6e 20 65 76 65 6e 74 0d |y with a|n event.|
|00002e00| 3e 6d 61 73 6b 20 74 68 | 61 74 20 69 67 6e 6f 72 |>mask th|at ignor|
|00002e10| 65 73 20 65 76 65 6e 74 | 73 20 79 6f 75 20 64 6f |es event|s you do|
|00002e20| 6e 27 74 20 63 61 72 65 | 20 61 62 6f 75 74 3f 20 |n't care| about? |
|00002e30| 54 68 61 74 20 77 61 79 | 20 79 6f 75 20 77 6f 6e |That way| you won|
|00002e40| 27 74 20 65 6e 64 20 75 | 70 0d 3e 77 69 74 68 20 |'t end u|p.>with |
|00002e50| 61 6e 20 65 76 65 6e 74 | 20 6c 6f 6f 70 20 69 6e |an event| loop in|
|00002e60| 73 69 64 65 20 79 6f 75 | 72 20 63 6f 6d 70 75 74 |side you|r comput|
|00002e70| 65 2d 69 6e 74 65 6e 73 | 69 76 65 20 6c 6f 6f 70 |e-intens|ive loop|
|00002e80| 20 61 6e 64 20 28 70 72 | 65 73 75 6d 61 62 6c 79 | and (pr|esumably|
|00002e90| 29 0d 3e 61 6e 6f 74 68 | 65 72 20 6f 6e 65 20 69 |).>anoth|er one i|
|00002ea0| 6e 20 79 6f 75 72 20 6d | 61 69 6e 20 70 72 6f 67 |n your m|ain prog|
|00002eb0| 72 61 6d 2e 20 28 44 54 | 53 20 77 69 6c 6c 20 63 |ram. (DT|S will c|
|00002ec0| 65 72 74 61 69 6e 6c 79 | 20 66 72 6f 77 6e 20 6f |ertainly| frown o|
|00002ed0| 6e 20 63 61 6c 6c 69 6e | 67 0d 3e 57 61 69 74 4e |n callin|g.>WaitN|
|00002ee0| 65 78 74 45 76 65 6e 74 | 20 66 72 6f 6d 20 6d 6f |extEvent| from mo|
|00002ef0| 72 65 20 74 68 61 6e 20 | 6f 6e 65 20 70 6c 61 63 |re than |one plac|
|00002f00| 65 20 69 6e 20 79 6f 75 | 72 20 70 72 6f 67 72 61 |e in you|r progra|
|00002f10| 6d 29 2e 20 41 6e 64 20 | 72 61 74 68 65 72 20 74 |m). And |rather t|
|00002f20| 68 61 6e 0d 3e 75 73 69 | 6e 67 20 54 69 63 6b 73 |han.>usi|ng Ticks|
|00002f30| 20 61 6e 64 20 74 68 65 | 20 6c 6f 63 61 6c 20 63 | and the| local c|
|00002f40| 6f 75 6e 74 65 72 2c 20 | 75 73 65 20 61 20 6d 6f |ounter, |use a mo|
|00002f50| 64 75 6c 6f 20 63 61 6c | 63 75 6c 61 74 69 6f 6e |dulo cal|culation|
|00002f60| 20 6f 6e 20 79 6f 75 72 | 20 6c 6f 6f 70 0d 3e 76 | on your| loop.>v|
|00002f70| 61 72 69 61 62 6c 65 3b | 20 65 2e 67 2e 20 63 68 |ariable;| e.g. ch|
|00002f80| 65 63 6b 20 66 6f 72 20 | 61 6e 20 65 76 65 6e 74 |eck for |an event|
|00002f90| 20 65 76 65 72 79 20 31 | 30 2c 30 30 30 20 69 74 | every 1|0,000 it|
|00002fa0| 65 72 61 74 69 6f 6e 73 | 20 6f 72 20 73 6f 2e 0d |erations| or so..|
|00002fb0| 3e 0d 0d 59 6f 75 27 72 | 65 20 72 69 67 68 74 2c |>..You'r|e right,|
|00002fc0| 20 45 76 65 6e 74 41 76 | 61 69 6c 20 69 73 20 61 | EventAv|ail is a|
|00002fd0| 20 62 65 74 74 65 72 20 | 63 68 6f 69 63 65 20 66 | better |choice f|
|00002fe0| 6f 72 20 70 6f 6c 6c 69 | 6e 67 2e 20 20 42 75 74 |or polli|ng. But|
|00002ff0| 20 77 68 61 74 27 73 0d | 77 72 6f 6e 67 20 77 69 | what's.|wrong wi|
|00003000| 74 68 20 63 61 6c 6c 69 | 6e 67 20 57 4e 45 20 66 |th calli|ng WNE f|
|00003010| 72 6f 6d 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e |rom more| than on|
|00003020| 65 20 70 6c 61 63 65 3f | 20 20 57 4e 45 20 68 61 |e place?| WNE ha|
|00003030| 73 20 61 6e 20 65 76 65 | 6e 74 6d 61 73 6b 0d 61 |s an eve|ntmask.a|
|00003040| 6c 73 6f 2e 20 20 49 20 | 6a 75 73 74 20 67 65 74 |lso. I |just get|
|00003050| 20 74 68 65 20 65 76 65 | 6e 74 73 20 74 68 61 74 | the eve|nts that|
|00003060| 20 49 20 77 61 6e 74 20 | 74 6f 20 61 62 6f 72 74 | I want |to abort|
|00003070| 20 6d 79 20 6c 6f 6f 70 | 2c 20 61 6c 6c 6f 77 20 | my loop|, allow |
|00003080| 57 4e 45 20 74 6f 0d 70 | 75 74 20 74 68 65 20 70 |WNE to.p|ut the p|
|00003090| 72 6f 67 72 61 6d 20 69 | 6e 20 74 68 65 20 62 61 |rogram i|n the ba|
|000030a0| 63 6b 67 72 6f 75 6e 64 | 2c 20 65 74 63 2e 0d 0d |ckground|, etc...|
|000030b0| 55 73 69 6e 67 20 61 20 | 6d 6f 64 75 6c 61 20 6f |Using a |modula o|
|000030c0| 6e 20 74 68 65 20 6c 6f | 6f 70 20 63 6f 75 6e 74 |n the lo|op count|
|000030d0| 20 69 73 20 76 65 72 79 | 20 62 61 64 2e 20 20 54 | is very| bad. T|
|000030e0| 68 65 20 64 69 66 66 65 | 72 65 6e 63 65 20 69 6e |he diffe|rence in|
|000030f0| 20 73 70 65 65 64 0d 62 | 65 74 77 65 65 6e 20 61 | speed.b|etween a|
|00003100| 20 50 6c 75 73 20 61 6e | 64 20 61 20 38 31 30 30 | Plus an|d a 8100|
|00003110| 2f 38 30 20 69 73 20 65 | 6e 6f 72 6d 6f 75 73 2c |/80 is e|normous,|
|00003120| 20 65 73 70 65 63 69 61 | 6c 6c 79 20 6f 6e 20 46 | especia|lly on F|
|00003130| 50 20 73 74 75 66 66 2e | 0d 45 69 74 68 65 72 20 |P stuff.|.Either |
|00003140| 79 6f 75 20 77 69 6c 6c | 20 70 6f 6c 6c 20 6d 75 |you will| poll mu|
|00003150| 63 68 20 74 6f 20 73 65 | 6c 64 6f 6d 20 6f 6e 20 |ch to se|ldom on |
|00003160| 73 6c 6f 77 20 6d 61 63 | 68 69 6e 65 73 2e 20 20 |slow mac|hines. |
|00003170| 4f 72 20 77 61 73 74 65 | 20 61 20 6c 6f 74 0d 6f |Or waste| a lot.o|
|00003180| 66 20 74 69 6d 65 20 69 | 6e 20 57 4e 45 20 6f 6e |f time i|n WNE on|
|00003190| 20 66 61 73 74 20 6d 61 | 63 68 69 6e 65 73 2e 20 | fast ma|chines. |
|000031a0| 20 54 68 61 74 27 73 20 | 61 73 73 75 6d 69 6e 67 | That's |assuming|
|000031b0| 20 74 68 61 74 20 74 68 | 65 20 74 69 6d 65 20 74 | that th|e time t|
|000031c0| 68 72 6f 75 67 68 0d 74 | 68 65 20 6c 6f 6f 70 20 |hrough.t|he loop |
|000031d0| 69 73 20 64 65 74 65 72 | 6d 69 6e 69 73 74 69 63 |is deter|ministic|
|000031e0| 2e 20 20 49 66 20 69 74 | 20 69 73 6e 27 74 2c 20 |. If it| isn't, |
|000031f0| 74 68 65 20 4d 61 63 20 | 47 55 49 20 63 6f 75 6c |the Mac |GUI coul|
|00003200| 64 20 67 65 74 20 6a 65 | 72 6b 79 0d 73 75 64 64 |d get je|rky.sudd|
|00003210| 65 6e 6c 79 20 69 66 20 | 74 68 65 20 6d 6f 64 75 |enly if |the modu|
|00003220| 6c 6f 20 69 73 20 73 65 | 74 20 77 72 6f 6e 67 20 |lo is se|t wrong |
|00003230| 6f 6e 20 61 6e 79 20 6d | 61 63 68 69 6e 65 2e 0d |on any m|achine..|
|00003240| 0d 4d 79 20 67 6f 61 6c | 20 77 61 73 20 74 6f 20 |.My goal| was to |
|00003250| 70 6f 6c 6c 20 57 4e 45 | 20 61 74 20 74 68 65 20 |poll WNE| at the |
|00003260| 73 61 6d 65 20 72 61 74 | 65 20 6f 6e 20 73 6c 6f |same rat|e on slo|
|00003270| 77 20 61 6e 64 20 66 61 | 73 74 20 6d 61 63 68 69 |w and fa|st machi|
|00003280| 6e 65 73 20 73 6f 0d 74 | 68 61 74 20 74 68 65 20 |nes so.t|hat the |
|00003290| 4d 61 63 20 47 55 49 20 | 6e 65 76 65 72 20 66 65 |Mac GUI |never fe|
|000032a0| 65 6c 73 20 6a 65 72 6b | 79 20 28 6d 65 6e 75 73 |els jerk|y (menus|
|000032b0| 20 64 72 6f 70 20 70 72 | 6f 6d 70 74 6c 79 2c 20 | drop pr|omptly, |
|000032c0| 65 74 63 2e 29 2e 20 20 | 41 72 6f 75 6e 64 0d 74 |etc.). |Around.t|
|000032d0| 68 65 20 6e 65 69 67 68 | 62 6f 72 68 6f 6f 64 20 |he neigh|borhood |
|000032e0| 6f 66 20 31 35 20 74 69 | 6d 65 73 20 61 20 73 65 |of 15 ti|mes a se|
|000032f0| 63 6f 6e 64 20 66 65 65 | 6c 73 20 61 62 6f 75 74 |cond fee|ls about|
|00003300| 20 72 69 67 68 74 2e 20 | 20 54 68 69 73 20 77 6f | right. | This wo|
|00003310| 72 6b 73 0d 66 6f 72 20 | 6d 65 20 61 6e 64 20 64 |rks.for |me and d|
|00003320| 6f 65 73 6e 27 74 20 73 | 6c 6f 77 20 64 6f 77 6e |oesn't s|low down|
|00003330| 20 61 20 70 72 6f 67 72 | 61 6d 20 74 68 61 74 20 | a progr|am that |
|00003340| 73 70 65 6e 64 73 20 61 | 20 6c 6f 74 20 6f 66 20 |spends a| lot of |
|00003350| 74 69 6d 65 20 64 6f 69 | 6e 67 0d 46 46 54 27 73 |time doi|ng.FFT's|
|00003360| 20 6d 6f 72 65 20 74 68 | 61 6e 20 31 25 2e 0d 0d | more th|an 1%...|
|00003370| 2d 20 2d 0d 52 6f 6e 61 | 6c 64 20 48 2e 20 4e 69 |- -.Rona|ld H. Ni|
|00003380| 63 68 6f 6c 73 6f 6e 2c | 20 4a 72 2e 09 72 68 6e |cholson,| Jr..rhn|
|00003390| 40 65 6e 67 72 2e 73 67 | 69 2e 63 6f 6d 2c 20 72 |@engr.sg|i.com, r|
|000033a0| 68 6e 40 6e 65 74 63 6f | 6d 2e 63 6f 6d 2c 20 4e |hn@netco|m.com, N|
|000033b0| 36 59 57 55 0d 23 69 6e | 63 6c 75 64 65 20 3c 63 |6YWU.#in|clude <c|
|000033c0| 61 6e 6f 6e 69 63 61 6c | 2e 64 69 73 63 6c 61 69 |anonical|.disclai|
|000033d0| 6d 65 72 3e 20 09 2f 2f | 20 49 20 73 70 65 61 6b |mer> .//| I speak|
|000033e0| 20 6f 6e 6c 79 20 66 6f | 72 20 6d 79 73 65 6c 66 | only fo|r myself|
|000033f0| 2c 20 65 74 63 2e 0d 0d | 2b 2b 2b 2b 2b 2b 2b 2b |, etc...|++++++++|
|00003400| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00003410| 2b 2b 2b 0d 0d 3e 46 72 | 6f 6d 20 72 61 64 69 78 |+++..>Fr|om radix|
|00003420| 69 6e 63 40 61 6f 6c 2e | 63 6f 6d 20 28 52 61 64 |inc@aol.|com (Rad|
|00003430| 69 78 49 6e 63 29 0d 44 | 61 74 65 3a 20 32 35 20 |ixInc).D|ate: 25 |
|00003440| 41 75 67 20 31 39 39 34 | 20 31 35 3a 32 39 3a 31 |Aug 1994| 15:29:1|
|00003450| 30 20 2d 30 34 30 30 0d | 4f 72 67 61 6e 69 7a 61 |0 -0400.|Organiza|
|00003460| 74 69 6f 6e 3a 20 41 6d | 65 72 69 63 61 20 4f 6e |tion: Am|erica On|
|00003470| 6c 69 6e 65 2c 20 49 6e | 63 2e 20 28 31 2d 38 30 |line, In|c. (1-80|
|00003480| 30 2d 38 32 37 2d 36 33 | 36 34 29 0d 0d 49 20 75 |0-827-63|64)..I u|
|00003490| 6e 64 65 72 73 74 61 6e | 64 20 74 68 61 74 20 74 |nderstan|d that t|
|000034a0| 68 65 20 6f 76 65 72 68 | 65 61 64 20 6f 66 20 6d |he overh|ead of m|
|000034b0| 61 6b 69 6e 67 20 74 68 | 65 20 57 4e 45 20 74 6f |aking th|e WNE to|
|000034c0| 6f 6c 62 6f 78 20 63 61 | 6c 6c 20 61 6e 64 20 70 |olbox ca|ll and p|
|000034d0| 6f 6c 6c 69 6e 67 0d 66 | 6f 72 20 65 76 65 6e 74 |olling.f|or event|
|000034e0| 73 20 69 73 20 74 69 6d | 65 20 63 6f 6e 73 75 6d |s is tim|e consum|
|000034f0| 69 6e 67 2c 20 65 73 70 | 65 63 69 61 6c 6c 79 20 |ing, esp|ecially |
|00003500| 69 66 20 79 6f 75 20 61 | 72 65 20 74 72 79 69 6e |if you a|re tryin|
|00003510| 67 20 74 6f 20 73 71 75 | 65 65 7a 65 20 74 68 65 |g to squ|eeze the|
|00003520| 0d 6d 6f 73 74 20 70 65 | 72 66 6f 72 6d 61 6e 63 |.most pe|rformanc|
|00003530| 65 20 6f 75 74 20 6f 66 | 20 61 20 6c 6f 6f 70 2e |e out of| a loop.|
|00003540| 20 4c 6f 74 73 20 6f 66 | 20 70 72 6f 67 72 61 6d | Lots of| program|
|00003550| 73 20 6a 75 73 74 20 70 | 75 74 20 75 70 20 74 68 |s just p|ut up th|
|00003560| 65 20 22 77 61 74 63 68 | 22 0d 63 75 72 73 6f 72 |e "watch|".cursor|
|00003570| 20 61 6e 64 20 69 67 6e | 6f 72 65 20 61 6c 6c 20 | and ign|ore all |
|00003580| 65 76 65 6e 74 73 20 77 | 68 69 6c 65 20 74 68 65 |events w|hile the|
|00003590| 79 20 64 6f 20 74 68 65 | 69 72 20 63 6f 6d 70 75 |y do the|ir compu|
|000035a0| 74 61 74 69 6f 6e 2e 20 | 54 68 69 73 20 69 73 0d |tation. |This is.|
|000035b0| 63 6f 6e 73 69 64 65 72 | 65 64 20 62 61 64 20 65 |consider|ed bad e|
|000035c0| 74 69 71 75 65 74 74 65 | 2c 20 62 65 63 61 75 73 |tiquette|, becaus|
|000035d0| 65 20 57 4e 45 20 64 6f | 65 73 20 6d 6f 72 65 20 |e WNE do|es more |
|000035e0| 74 68 61 6e 20 6a 75 73 | 74 20 66 65 65 64 20 65 |than jus|t feed e|
|000035f0| 76 65 6e 74 73 20 74 6f | 0d 79 6f 75 72 20 61 70 |vents to|.your ap|
|00003600| 70 2e 20 49 74 20 69 73 | 20 74 68 65 20 6f 6e 6c |p. It is| the onl|
|00003610| 79 20 77 61 79 20 74 6f | 20 6c 65 74 20 6f 74 68 |y way to| let oth|
|00003620| 65 72 20 70 72 6f 63 65 | 73 73 65 73 20 68 61 76 |er proce|sses hav|
|00003630| 65 20 74 69 6d 65 2e 20 | 54 68 6f 73 65 20 6f 74 |e time. |Those ot|
|00003640| 68 65 72 0d 70 72 6f 63 | 65 73 73 65 73 20 6d 61 |her.proc|esses ma|
|00003650| 79 20 6a 75 73 74 20 62 | 65 20 61 70 70 73 20 73 |y just b|e apps s|
|00003660| 69 74 74 69 6e 67 20 74 | 68 65 72 65 20 77 61 69 |itting t|here wai|
|00003670| 74 69 6e 67 20 66 6f 72 | 20 75 73 65 72 20 69 6e |ting for| user in|
|00003680| 70 75 74 2c 20 69 6e 20 | 77 68 69 63 68 0d 63 61 |put, in |which.ca|
|00003690| 73 65 20 69 74 20 64 6f | 65 73 6e 27 74 20 6d 61 |se it do|esn't ma|
|000036a0| 74 74 65 72 2c 20 62 75 | 74 20 74 68 65 79 20 6d |tter, bu|t they m|
|000036b0| 61 79 20 62 65 20 69 6d | 70 6f 72 74 61 6e 74 20 |ay be im|portant |
|000036c0| 62 61 63 6b 67 72 6f 75 | 6e 64 20 70 72 6f 63 65 |backgrou|nd proce|
|000036d0| 73 73 65 73 2c 0d 73 75 | 63 68 20 61 73 20 6e 65 |sses,.su|ch as ne|
|000036e0| 74 77 6f 72 6b 20 73 6f | 66 74 77 61 72 65 20 6f |twork so|ftware o|
|000036f0| 72 20 62 61 63 6b 67 72 | 6f 75 6e 64 20 70 72 69 |r backgr|ound pri|
|00003700| 6e 74 69 6e 67 2e 0d 0d | 42 65 63 61 75 73 65 20 |nting...|Because |
|00003710| 73 6f 20 6d 61 6e 79 20 | 70 72 6f 67 72 61 6d 73 |so many |programs|
|00003720| 20 61 72 65 20 72 75 64 | 65 20 61 62 6f 75 74 20 | are rud|e about |
|00003730| 67 69 76 69 6e 67 20 75 | 70 20 74 69 6d 65 20 77 |giving u|p time w|
|00003740| 69 74 68 20 57 4e 45 2c | 20 73 6f 6d 65 0d 64 65 |ith WNE,| some.de|
|00003750| 76 65 6c 6f 70 65 72 73 | 20 68 61 76 65 20 67 6f |velopers| have go|
|00003760| 6e 65 20 74 68 65 20 72 | 6f 75 74 65 20 6f 66 20 |ne the r|oute of |
|00003770| 69 6e 73 74 61 6c 6c 69 | 6e 67 20 56 42 4c 20 6f |installi|ng VBL o|
|00003780| 72 20 54 69 6d 65 20 4d | 61 6e 61 67 65 72 20 74 |r Time M|anager t|
|00003790| 61 73 6b 73 20 74 6f 0d | 6d 61 6b 65 20 73 75 72 |asks to.|make sur|
|000037a0| 65 20 74 68 65 79 20 67 | 65 74 20 74 69 6d 65 2c |e they g|et time,|
|000037b0| 20 61 6e 64 20 74 68 69 | 73 20 69 73 20 65 76 65 | and thi|s is eve|
|000037c0| 6e 20 77 6f 72 73 65 2e | 0d 0d 49 66 20 79 6f 75 |n worse.|..If you|
|000037d0| 72 20 6d 65 74 68 6f 64 | 20 6f 66 20 63 61 6c 6c |r method| of call|
|000037e0| 69 6e 67 20 57 4e 45 20 | 65 76 65 72 79 20 31 30 |ing WNE |every 10|
|000037f0| 20 74 69 63 6b 73 20 77 | 6f 72 6b 73 2c 20 61 6e | ticks w|orks, an|
|00003800| 64 20 79 6f 75 20 63 61 | 6e 20 6c 69 76 65 20 77 |d you ca|n live w|
|00003810| 69 74 68 0d 74 68 65 20 | 70 6f 74 65 6e 74 69 61 |ith.the |potentia|
|00003820| 6c 20 70 72 6f 62 6c 65 | 6d 73 20 6f 66 20 68 61 |l proble|ms of ha|
|00003830| 76 69 6e 67 20 74 77 6f | 20 57 4e 45 20 63 61 6c |ving two| WNE cal|
|00003840| 6c 73 20 69 6e 20 79 6f | 75 72 20 70 72 6f 67 72 |ls in yo|ur progr|
|00003850| 61 6d 2c 20 67 72 65 61 | 74 2e 20 49 0d 73 74 69 |am, grea|t. I.sti|
|00003860| 6c 6c 20 74 68 69 6e 6b | 20 79 6f 75 27 64 20 62 |ll think| you'd b|
|00003870| 65 20 62 65 74 74 65 72 | 20 6f 66 66 20 63 61 6c |e better| off cal|
|00003880| 6c 69 6e 67 20 45 76 65 | 6e 74 41 76 61 69 6c 20 |ling Eve|ntAvail |
|00003890| 77 69 74 68 20 61 6e 20 | 65 76 65 6e 74 20 6d 61 |with an |event ma|
|000038a0| 73 6b 2c 20 73 6f 0d 69 | 66 20 61 6e 20 65 76 65 |sk, so.i|f an eve|
|000038b0| 6e 74 20 64 6f 65 73 20 | 73 68 6f 77 20 75 70 20 |nt does |show up |
|000038c0| 79 6f 75 20 63 61 6e 20 | 65 78 69 74 20 79 6f 75 |you can |exit you|
|000038d0| 72 20 6c 6f 6f 70 20 61 | 6e 64 20 6c 65 74 20 79 |r loop a|nd let y|
|000038e0| 6f 75 72 20 22 6d 61 69 | 6e 22 20 65 76 65 6e 0d |our "mai|n" even.|
|000038f0| 6c 6f 6f 70 20 68 61 6e | 64 6c 65 20 74 68 65 20 |loop han|dle the |
|00003900| 65 76 65 6e 74 20 28 45 | 76 65 6e 74 41 76 61 69 |event (E|ventAvai|
|00003910| 6c 20 64 6f 65 73 6e 27 | 74 20 64 65 71 75 65 75 |l doesn'|t dequeu|
|00003920| 65 20 74 68 65 20 65 76 | 65 6e 74 29 2e 20 59 6f |e the ev|ent). Yo|
|00003930| 75 20 63 61 6e 20 75 73 | 65 0d 61 20 6d 61 73 6b |u can us|e.a mask|
|00003940| 20 74 6f 20 6a 75 73 74 | 20 6c 6f 6f 6b 20 66 6f | to just| look fo|
|00003950| 72 20 6b 65 79 62 6f 61 | 72 64 20 65 76 65 6e 74 |r keyboa|rd event|
|00003960| 73 2c 20 73 6f 20 6d 6f | 75 73 65 20 65 76 65 6e |s, so mo|use even|
|00003970| 74 73 20 61 6e 64 20 73 | 6f 20 6f 6e 20 61 72 65 |ts and s|o on are|
|00003980| 0d 69 67 6e 6f 72 65 64 | 20 28 62 75 74 20 72 65 |.ignored| (but re|
|00003990| 6d 61 69 6e 20 69 6e 20 | 74 68 65 20 65 76 65 6e |main in |the even|
|000039a0| 20 71 75 65 75 65 29 2e | 0d 0d 41 6c 73 6f 20 6b | queue).|..Also k|
|000039b0| 65 65 70 20 69 6e 20 6d | 69 6e 64 20 74 68 61 74 |eep in m|ind that|
|000039c0| 2c 20 64 65 70 65 6e 64 | 69 6e 67 20 6f 6e 20 74 |, depend|ing on t|
|000039d0| 68 65 20 73 70 65 65 64 | 20 6f 66 20 74 68 65 20 |he speed| of the |
|000039e0| 4d 61 63 20 79 6f 75 20 | 61 72 65 20 72 75 6e 6e |Mac you |are runn|
|000039f0| 69 6e 67 0d 6f 6e 2c 20 | 65 76 65 6e 74 73 20 64 |ing.on, |events d|
|00003a00| 6f 6e 27 74 20 6c 69 76 | 65 20 61 6c 6c 20 74 68 |on't liv|e all th|
|00003a10| 61 74 20 6c 6f 6e 67 2e | 20 54 68 65 20 65 76 65 |at long.| The eve|
|00003a20| 6e 74 20 71 75 65 75 65 | 20 6f 6e 6c 79 20 68 6f |nt queue| only ho|
|00003a30| 6c 64 73 20 32 30 20 65 | 76 65 6e 74 73 2c 0d 61 |lds 20 e|vents,.a|
|00003a40| 6e 64 20 69 66 20 79 6f | 75 20 61 72 65 6e 27 74 |nd if yo|u aren't|
|00003a50| 20 72 65 6d 6f 76 69 6e | 67 20 74 68 65 6d 20 77 | removin|g them w|
|00003a60| 69 74 68 20 57 4e 45 20 | 74 68 65 20 6f 6c 64 20 |ith WNE |the old |
|00003a70| 65 76 65 6e 74 73 20 77 | 69 6c 6c 20 62 65 20 6c |events w|ill be l|
|00003a80| 6f 73 74 2e 20 54 68 61 | 74 0d 6d 65 61 6e 73 20 |ost. Tha|t.means |
|00003a90| 79 6f 75 20 68 61 76 65 | 20 74 6f 20 70 6f 6c 6c |you have| to poll|
|00003aa0| 20 66 6f 72 20 65 76 65 | 6e 74 73 20 66 61 73 74 | for eve|nts fast|
|00003ab0| 20 65 6e 6f 75 67 68 20 | 74 6f 20 63 61 74 63 68 | enough |to catch|
|00003ac0| 20 74 68 65 6d 20 62 65 | 66 6f 72 65 20 74 68 65 | them be|fore the|
|00003ad0| 79 0d 61 72 65 20 6c 6f | 73 74 2e 20 55 73 65 72 |y.are lo|st. User|
|00003ae0| 2d 69 6e 74 65 72 66 61 | 63 65 20 65 76 65 6e 74 |-interfa|ce event|
|00003af0| 73 20 77 69 6c 6c 20 68 | 61 70 70 65 6e 20 6d 75 |s will h|appen mu|
|00003b00| 63 68 20 6c 65 73 73 20 | 66 72 65 71 75 65 6e 74 |ch less |frequent|
|00003b10| 6c 79 20 74 68 61 6e 0d | 65 76 65 72 79 20 31 30 |ly than.|every 10|
|00003b20| 20 74 69 63 6b 73 2c 20 | 62 75 74 20 6e 65 74 77 | ticks, |but netw|
|00003b30| 6f 72 6b 20 65 76 65 6e | 74 73 20 6d 61 79 20 68 |ork even|ts may h|
|00003b40| 61 70 70 65 6e 20 76 65 | 72 79 20 66 61 73 74 20 |appen ve|ry fast |
|00003b50| 6f 6e 20 63 65 72 74 61 | 69 6e 20 4d 61 63 73 2e |on certa|in Macs.|
|00003b60| 0d 0d 0d 47 72 65 67 6f | 72 79 20 4a 6f 72 67 65 |...Grego|ry Jorge|
|00003b70| 6e 73 65 6e 0d 52 61 64 | 69 78 20 43 6f 6e 73 75 |nsen.Rad|ix Consu|
|00003b80| 6c 74 69 6e 67 20 49 6e | 63 2e 0d 0d 2b 2b 2b 2b |lting In|c...++++|
|00003b90| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00003ba0| 2b 2b 2b 2b 2b 2b 2b 0d | 0d 3e 46 72 6f 6d 20 77 |+++++++.|.>From w|
|00003bb0| 69 6c 6b 69 6e 73 40 6a | 61 72 74 68 75 72 2e 63 |ilkins@j|arthur.c|
|00003bc0| 73 2e 68 6d 63 2e 65 64 | 75 20 28 4d 61 72 6b 20 |s.hmc.ed|u (Mark |
|00003bd0| 57 69 6c 6b 69 6e 73 29 | 0d 44 61 74 65 3a 20 32 |Wilkins)|.Date: 2|
|00003be0| 35 20 41 75 67 20 31 39 | 39 34 20 32 31 3a 30 33 |5 Aug 19|94 21:03|
|00003bf0| 3a 30 37 20 47 4d 54 0d | 4f 72 67 61 6e 69 7a 61 |:07 GMT.|Organiza|
|00003c00| 74 69 6f 6e 3a 20 48 61 | 72 76 65 79 20 4d 75 64 |tion: Ha|rvey Mud|
|00003c10| 64 20 43 6f 6c 6c 65 67 | 65 2c 20 43 6c 61 72 65 |d Colleg|e, Clare|
|00003c20| 6d 6f 6e 74 20 43 41 0d | 0d 49 6e 20 61 72 74 69 |mont CA.|.In arti|
|00003c30| 63 6c 65 20 3c 33 33 69 | 72 65 36 24 73 34 69 40 |cle <33i|re6$s4i@|
|00003c40| 73 65 61 72 63 68 30 31 | 2e 6e 65 77 73 2e 61 6f |search01|.news.ao|
|00003c50| 6c 2e 63 6f 6d 3e 2c 0d | 52 61 64 69 78 49 6e 63 |l.com>,.|RadixInc|
|00003c60| 20 3c 72 61 64 69 78 69 | 6e 63 40 61 6f 6c 2e 63 | <radixi|nc@aol.c|
|00003c70| 6f 6d 3e 20 77 72 6f 74 | 65 3a 0d 3e 49 66 20 79 |om> wrot|e:.>If y|
|00003c80| 6f 75 72 20 6d 65 74 68 | 6f 64 20 6f 66 20 63 61 |our meth|od of ca|
|00003c90| 6c 6c 69 6e 67 20 57 4e | 45 20 65 76 65 72 79 20 |lling WN|E every |
|00003ca0| 31 30 20 74 69 63 6b 73 | 20 77 6f 72 6b 73 2c 20 |10 ticks| works, |
|00003cb0| 61 6e 64 20 79 6f 75 20 | 63 61 6e 20 6c 69 76 65 |and you |can live|
|00003cc0| 20 77 69 74 68 0d 3e 74 | 68 65 20 70 6f 74 65 6e | with.>t|he poten|
|00003cd0| 74 69 61 6c 20 70 72 6f | 62 6c 65 6d 73 20 6f 66 |tial pro|blems of|
|00003ce0| 20 68 61 76 69 6e 67 20 | 74 77 6f 20 57 4e 45 20 | having |two WNE |
|00003cf0| 63 61 6c 6c 73 20 69 6e | 20 79 6f 75 72 20 70 72 |calls in| your pr|
|00003d00| 6f 67 72 61 6d 2c 20 67 | 72 65 61 74 2e 20 49 0d |ogram, g|reat. I.|
|00003d10| 3e 73 74 69 6c 6c 20 74 | 68 69 6e 6b 20 79 6f 75 |>still t|hink you|
|00003d20| 27 64 20 62 65 20 62 65 | 74 74 65 72 20 6f 66 66 |'d be be|tter off|
|00003d30| 20 63 61 6c 6c 69 6e 67 | 20 45 76 65 6e 74 41 76 | calling| EventAv|
|00003d40| 61 69 6c 20 77 69 74 68 | 20 61 6e 20 65 76 65 6e |ail with| an even|
|00003d50| 74 20 6d 61 73 6b 2e 2e | 2e 0d 0d 0d 20 20 57 68 |t mask..|.... Wh|
|00003d60| 61 74 20 70 6f 73 73 69 | 62 6c 65 20 70 72 6f 62 |at possi|ble prob|
|00003d70| 6c 65 6d 73 20 63 6f 75 | 6c 64 20 62 65 20 63 61 |lems cou|ld be ca|
|00003d80| 75 73 65 64 20 62 79 20 | 68 61 76 69 6e 67 20 6d |used by |having m|
|00003d90| 75 6c 74 69 70 6c 65 20 | 63 61 6c 6c 73 20 74 6f |ultiple |calls to|
|00003da0| 0d 57 61 69 74 4e 65 78 | 74 45 76 65 6e 74 20 69 |.WaitNex|tEvent i|
|00003db0| 6e 20 61 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |n an app|lication|
|00003dc0| 2c 20 65 73 70 65 63 69 | 61 6c 6c 79 20 69 66 20 |, especi|ally if |
|00003dd0| 74 68 65 20 70 75 72 70 | 6f 73 65 20 69 73 20 74 |the purp|ose is t|
|00003de0| 6f 20 63 68 65 63 6b 20 | 66 6f 72 0d 69 6e 74 65 |o check |for.inte|
|00003df0| 72 72 75 70 74 69 6f 6e | 20 6f 66 20 61 20 74 69 |rruption| of a ti|
|00003e00| 6d 65 2d 63 6f 6e 73 75 | 6d 69 6e 67 20 70 72 6f |me-consu|ming pro|
|00003e10| 63 65 73 73 3f 0d 0d 20 | 20 41 6e 20 61 70 70 6c |cess?.. | An appl|
|00003e20| 69 63 61 74 69 6f 6e 20 | 77 68 69 63 68 20 64 6f |ication |which do|
|00003e30| 65 73 6e 27 74 20 74 72 | 79 20 74 6f 20 64 6f 20 |esn't tr|y to do |
|00003e40| 6e 69 66 74 79 20 74 68 | 69 6e 67 73 20 6c 69 6b |nifty th|ings lik|
|00003e50| 65 20 74 68 72 65 61 64 | 69 6e 67 20 77 69 6c 6c |e thread|ing will|
|00003e60| 0d 75 73 75 61 6c 6c 79 | 20 6c 69 6d 69 74 20 75 |.usually| limit u|
|00003e70| 73 65 72 20 69 6e 70 75 | 74 20 64 75 72 69 6e 67 |ser inpu|t during|
|00003e80| 20 61 20 74 69 6d 65 2d | 63 6f 6e 73 75 6d 69 6e | a time-|consumin|
|00003e90| 67 20 70 72 6f 63 65 73 | 73 69 6e 67 20 74 61 73 |g proces|sing tas|
|00003ea0| 6b 20 74 6f 20 74 68 61 | 74 0d 77 68 69 63 68 20 |k to tha|t.which |
|00003eb0| 63 6f 75 6c 64 20 69 6e | 74 65 72 72 75 70 74 20 |could in|terrupt |
|00003ec0| 74 68 65 20 74 61 73 6b | 20 6f 72 20 74 68 61 74 |the task| or that|
|00003ed0| 20 77 68 69 63 68 20 6e | 65 65 64 73 20 74 6f 20 | which n|eeds to |
|00003ee0| 62 65 20 70 61 73 73 65 | 64 20 6f 6e 20 74 6f 20 |be passe|d on to |
|00003ef0| 74 68 65 20 4f 53 0d 73 | 75 63 68 20 61 73 20 61 |the OS.s|uch as a|
|00003f00| 20 63 6c 69 63 6b 20 69 | 6e 20 61 6e 6f 74 68 65 | click i|n anothe|
|00003f10| 72 20 61 70 70 27 73 20 | 77 69 6e 64 6f 77 2e 0d |r app's |window..|
|00003f20| 0d 20 20 49 6e 20 6f 74 | 68 65 72 20 77 6f 72 64 |. In ot|her word|
|00003f30| 73 2c 20 77 68 79 20 73 | 68 6f 75 6c 64 20 49 20 |s, why s|hould I |
|00003f40| 63 61 72 65 20 69 66 20 | 49 27 6d 20 74 68 72 6f |care if |I'm thro|
|00003f50| 77 69 6e 67 20 61 77 61 | 79 20 65 76 65 6e 74 73 |wing awa|y events|
|00003f60| 20 77 68 69 63 68 20 64 | 6f 6e 27 74 0d 63 6f 6e | which d|on't.con|
|00003f70| 73 69 73 74 20 6f 66 20 | 61 20 63 6f 6d 6d 61 6e |sist of |a comman|
|00003f80| 64 20 70 65 72 69 6f 64 | 20 6f 72 20 6d 6f 75 73 |d period| or mous|
|00003f90| 65 20 63 6c 69 63 6b 20 | 77 68 65 6e 20 74 68 6f |e click |when tho|
|00003fa0| 73 65 20 61 72 65 20 74 | 68 65 20 6f 6e 6c 79 20 |se are t|he only |
|00003fb0| 74 77 6f 20 66 6f 72 6d | 73 0d 6f 66 20 69 6e 74 |two form|s.of int|
|00003fc0| 65 72 61 63 74 69 6f 6e | 20 6d 79 20 61 70 70 6c |eraction| my appl|
|00003fd0| 69 63 61 74 69 6f 6e 20 | 77 69 6c 6c 20 65 6e 74 |ication |will ent|
|00003fe0| 65 72 74 61 69 6e 20 77 | 68 65 6e 20 69 74 27 73 |ertain w|hen it's|
|00003ff0| 20 63 68 75 67 67 69 6e | 67 20 61 77 61 79 3f 20 | chuggin|g away? |
|00004000| 20 54 68 61 74 0d 69 73 | 2c 20 61 73 73 75 6d 69 | That.is|, assumi|
|00004010| 6e 67 20 49 27 6d 20 6f | 6e 6c 79 20 74 68 72 6f |ng I'm o|nly thro|
|00004020| 77 69 6e 67 20 61 77 61 | 79 20 65 76 65 6e 74 73 |wing awa|y events|
|00004030| 20 64 69 72 65 63 74 65 | 64 20 61 74 20 6d 79 20 | directe|d at my |
|00004040| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2e 2e 2e 0d 0d |applicat|ion.....|
|00004050| 20 20 49 27 6d 20 6a 75 | 73 74 20 6e 6f 74 20 73 | I'm ju|st not s|
|00004060| 75 72 65 20 49 20 73 65 | 65 20 74 68 65 20 69 73 |ure I se|e the is|
|00004070| 73 75 65 2e 0d 0d 2d 2d | 20 4d 61 72 6b 20 57 69 |sue...--| Mark Wi|
|00004080| 6c 6b 69 6e 73 0d 0d 2b | 2b 2b 2b 2b 2b 2b 2b 2b |lkins..+|++++++++|
|00004090| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|000040a0| 2b 2b 0d 0d 3e 46 72 6f | 6d 20 72 61 64 69 78 69 |++..>Fro|m radixi|
|000040b0| 6e 63 40 61 6f 6c 2e 63 | 6f 6d 20 28 52 61 64 69 |nc@aol.c|om (Radi|
|000040c0| 78 49 6e 63 29 0d 44 61 | 74 65 3a 20 32 36 20 41 |xInc).Da|te: 26 A|
|000040d0| 75 67 20 31 39 39 34 20 | 30 30 3a 31 31 3a 30 38 |ug 1994 |00:11:08|
|000040e0| 20 2d 30 34 30 30 0d 4f | 72 67 61 6e 69 7a 61 74 | -0400.O|rganizat|
|000040f0| 69 6f 6e 3a 20 41 6d 65 | 72 69 63 61 20 4f 6e 6c |ion: Ame|rica Onl|
|00004100| 69 6e 65 2c 20 49 6e 63 | 2e 20 28 31 2d 38 30 30 |ine, Inc|. (1-800|
|00004110| 2d 38 32 37 2d 36 33 36 | 34 29 0d 0d 49 6e 20 61 |-827-636|4)..In a|
|00004120| 72 74 69 63 6c 65 20 3c | 33 33 6a 30 75 62 24 65 |rticle <|33j0ub$e|
|00004130| 69 70 40 6a 61 77 73 2e | 63 73 2e 68 6d 63 2e 65 |ip@jaws.|cs.hmc.e|
|00004140| 64 75 3e 2c 20 77 69 6c | 6b 69 6e 73 40 6a 61 72 |du>, wil|kins@jar|
|00004150| 74 68 75 72 2e 63 73 2e | 68 6d 63 2e 65 64 75 20 |thur.cs.|hmc.edu |
|00004160| 28 4d 61 72 6b 0d 57 69 | 6c 6b 69 6e 73 29 20 77 |(Mark.Wi|lkins) w|
|00004170| 72 69 74 65 73 3a 0d 0d | 3c 3c 57 68 61 74 20 70 |rites:..|<<What p|
|00004180| 6f 73 73 69 62 6c 65 20 | 70 72 6f 62 6c 65 6d 73 |ossible |problems|
|00004190| 20 63 6f 75 6c 64 20 62 | 65 20 63 61 75 73 65 64 | could b|e caused|
|000041a0| 20 62 79 20 68 61 76 69 | 6e 67 20 6d 75 6c 74 69 | by havi|ng multi|
|000041b0| 70 6c 65 20 63 61 6c 6c | 73 20 74 6f 0d 57 61 69 |ple call|s to.Wai|
|000041c0| 74 4e 65 78 74 45 76 65 | 6e 74 20 69 6e 20 61 6e |tNextEve|nt in an|
|000041d0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 2c 20 65 73 | applica|tion, es|
|000041e0| 70 65 63 69 61 6c 6c 79 | 20 69 66 20 74 68 65 20 |pecially| if the |
|000041f0| 70 75 72 70 6f 73 65 20 | 69 73 20 74 6f 20 63 68 |purpose |is to ch|
|00004200| 65 63 6b 20 66 6f 72 0d | 69 6e 74 65 72 72 75 70 |eck for.|interrup|
|00004210| 74 69 6f 6e 20 6f 66 20 | 61 20 74 69 6d 65 2d 63 |tion of |a time-c|
|00004220| 6f 6e 73 75 6d 69 6e 67 | 20 70 72 6f 63 65 73 73 |onsuming| process|
|00004230| 3f 20 2e 2e 2e 20 49 6e | 20 6f 74 68 65 72 20 77 |? ... In| other w|
|00004240| 6f 72 64 73 2c 20 77 68 | 79 20 73 68 6f 75 6c 64 |ords, wh|y should|
|00004250| 20 49 0d 63 61 72 65 20 | 69 66 20 49 27 6d 20 74 | I.care |if I'm t|
|00004260| 68 72 6f 77 69 6e 67 20 | 61 77 61 79 20 65 76 65 |hrowing |away eve|
|00004270| 6e 74 73 20 77 68 69 63 | 68 20 64 6f 6e 27 74 20 |nts whic|h don't |
|00004280| 63 6f 6e 73 69 73 74 20 | 6f 66 20 61 20 63 6f 6d |consist |of a com|
|00004290| 6d 61 6e 64 20 70 65 72 | 69 6f 64 0d 6f 72 20 6d |mand per|iod.or m|
|000042a0| 6f 75 73 65 20 63 6c 69 | 63 6b 20 77 68 65 6e 20 |ouse cli|ck when |
|000042b0| 74 68 6f 73 65 20 61 72 | 65 20 74 68 65 20 6f 6e |those ar|e the on|
|000042c0| 6c 79 20 74 77 6f 20 66 | 6f 72 6d 73 20 6f 66 20 |ly two f|orms of |
|000042d0| 69 6e 74 65 72 61 63 74 | 69 6f 6e 20 6d 79 0d 61 |interact|ion my.a|
|000042e0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 77 69 6c 6c 20 |pplicati|on will |
|000042f0| 65 6e 74 65 72 74 61 69 | 6e 20 77 68 65 6e 20 69 |entertai|n when i|
|00004300| 74 27 73 20 63 68 75 67 | 67 69 6e 67 20 61 77 61 |t's chug|ging awa|
|00004310| 79 3f 20 20 54 68 61 74 | 20 69 73 2c 20 61 73 73 |y? That| is, ass|
|00004320| 75 6d 69 6e 67 20 49 27 | 6d 0d 6f 6e 6c 79 20 74 |uming I'|m.only t|
|00004330| 68 72 6f 77 69 6e 67 20 | 61 77 61 79 20 65 76 65 |hrowing |away eve|
|00004340| 6e 74 73 20 64 69 72 65 | 63 74 65 64 20 61 74 20 |nts dire|cted at |
|00004350| 6d 79 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2e 2e |my appli|cation..|
|00004360| 2e 3e 3e 0d 0d 49 74 27 | 73 20 6d 6f 73 74 6c 79 |.>>..It'|s mostly|
|00004370| 20 61 20 6d 61 74 74 65 | 72 20 6f 66 20 73 74 79 | a matte|r of sty|
|00004380| 6c 65 2c 20 61 6e 64 20 | 6f 66 20 63 6f 75 72 73 |le, and |of cours|
|00004390| 65 20 69 74 20 69 73 20 | 67 65 6e 65 72 69 63 20 |e it is |generic |
|000043a0| 4d 61 63 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 0d |Mac prog|ramming.|
|000043b0| 61 64 76 69 63 65 20 74 | 6f 20 68 61 76 65 20 6f |advice t|o have o|
|000043c0| 6e 6c 79 20 6f 6e 65 20 | 70 6c 61 63 65 20 69 6e |nly one |place in|
|000043d0| 20 79 6f 75 72 20 63 6f | 64 65 20 63 61 6c 6c 20 | your co|de call |
|000043e0| 57 4e 45 2e 20 49 74 20 | 73 6f 75 6e 64 73 20 6c |WNE. It |sounds l|
|000043f0| 69 6b 65 20 79 6f 75 0d | 6b 6e 6f 77 20 77 68 61 |ike you.|know wha|
|00004400| 74 20 79 6f 75 20 61 72 | 65 20 64 6f 69 6e 67 2c |t you ar|e doing,|
|00004410| 20 61 6e 64 20 70 65 72 | 68 61 70 73 20 74 68 69 | and per|haps thi|
|00004420| 73 20 69 73 20 74 68 65 | 20 62 65 73 74 20 77 61 |s is the| best wa|
|00004430| 79 20 74 6f 20 68 61 6e | 64 6c 65 20 69 74 2e 0d |y to han|dle it..|
|00004440| 54 68 65 20 63 6f 6d 70 | 6c 69 63 61 74 69 6f 6e |The comp|lication|
|00004450| 20 6f 66 20 63 61 6c 6c | 69 6e 67 20 57 4e 45 20 | of call|ing WNE |
|00004460| 66 72 6f 6d 20 6d 6f 72 | 65 20 74 68 61 6e 20 6f |from mor|e than o|
|00004470| 6e 65 20 70 6c 61 63 65 | 20 69 73 20 74 68 61 74 |ne place| is that|
|00004480| 20 79 6f 75 20 68 61 76 | 65 0d 74 6f 20 28 6f 72 | you hav|e.to (or|
|00004490| 20 61 74 20 6c 65 61 73 | 74 20 73 68 6f 75 6c 64 | at leas|t should|
|000044a0| 29 20 68 61 6e 64 6c 65 | 20 41 4c 4c 20 65 76 65 |) handle| ALL eve|
|000044b0| 6e 74 73 20 79 6f 75 20 | 67 65 74 2e 20 49 6e 20 |nts you |get. In |
|000044c0| 79 6f 75 72 20 63 61 73 | 65 20 79 6f 75 20 61 72 |your cas|e you ar|
|000044d0| 65 0d 67 6f 69 6e 67 20 | 74 6f 20 69 67 6e 6f 72 |e.going |to ignor|
|000044e0| 65 20 61 6c 6c 20 65 76 | 65 6e 74 73 20 65 78 63 |e all ev|ents exc|
|000044f0| 65 70 74 20 74 68 65 20 | 6f 6e 65 73 20 74 68 61 |ept the |ones tha|
|00004500| 74 20 63 61 6e 20 74 65 | 72 6d 69 6e 61 74 65 20 |t can te|rminate |
|00004510| 79 6f 75 72 20 6c 6f 6f | 70 2e 0d 49 74 27 73 20 |your loo|p..It's |
|00004520| 6d 6f 73 74 20 69 6d 70 | 6f 72 74 61 6e 74 20 74 |most imp|ortant t|
|00004530| 68 61 74 20 79 6f 75 20 | 63 61 6c 6c 20 57 4e 45 |hat you |call WNE|
|00004540| 20 70 65 72 69 6f 64 69 | 63 61 6c 6c 79 20 28 61 | periodi|cally (a|
|00004550| 6e 64 20 6f 66 74 65 6e | 29 2c 20 66 6f 72 20 74 |nd often|), for t|
|00004560| 68 65 0d 72 65 61 73 6f | 6e 73 20 6d 65 6e 74 69 |he.reaso|ns menti|
|00004570| 6f 6e 65 64 20 69 6e 20 | 6d 79 20 70 72 65 76 69 |oned in |my previ|
|00004580| 6f 75 73 20 70 6f 73 74 | 2c 20 65 76 65 6e 20 69 |ous post|, even i|
|00004590| 66 20 79 6f 75 20 64 6f | 6e 27 74 20 68 61 6e 64 |f you do|n't hand|
|000045a0| 6c 65 20 61 6c 6c 20 6f | 66 20 74 68 65 0d 65 76 |le all o|f the.ev|
|000045b0| 65 6e 74 73 2e 0d 0d 42 | 65 73 69 64 65 73 20 74 |ents...B|esides t|
|000045c0| 68 65 20 6b 65 79 20 61 | 6e 64 20 6d 6f 75 73 65 |he key a|nd mouse|
|000045d0| 20 65 76 65 6e 74 73 2c | 20 74 68 65 72 65 20 61 | events,| there a|
|000045e0| 72 65 20 6f 74 68 65 72 | 20 65 76 65 6e 74 73 20 |re other| events |
|000045f0| 79 6f 75 20 6d 61 79 20 | 67 65 74 2e 20 59 6f 75 |you may |get. You|
|00004600| 0d 63 61 6e 27 74 20 72 | 65 61 6c 6c 79 20 67 65 |.can't r|eally ge|
|00004610| 74 20 73 77 69 74 63 68 | 65 64 20 6f 75 74 20 69 |t switch|ed out i|
|00004620| 66 20 79 6f 75 20 69 67 | 6e 6f 72 65 20 6d 6f 75 |f you ig|nore mou|
|00004630| 73 65 20 63 6c 69 63 6b | 73 20 6f 75 74 73 69 64 |se click|s outsid|
|00004640| 65 20 6f 66 20 79 6f 75 | 72 0d 77 69 6e 64 6f 77 |e of you|r.window|
|00004650| 2c 20 62 75 74 20 61 6e | 6f 74 68 65 72 20 70 72 |, but an|other pr|
|00004660| 6f 63 65 73 73 20 63 6f | 75 6c 64 20 64 6f 20 73 |ocess co|uld do s|
|00004670| 6f 6d 65 74 68 69 6e 67 | 20 74 68 61 74 20 63 61 |omething| that ca|
|00004680| 75 73 65 73 20 61 6e 20 | 75 70 64 61 74 65 20 65 |uses an |update e|
|00004690| 76 65 6e 74 0d 69 6e 20 | 6f 6e 65 20 6f 66 20 79 |vent.in |one of y|
|000046a0| 6f 75 72 20 77 69 6e 64 | 6f 77 73 2e 20 4f 72 20 |our wind|ows. Or |
|000046b0| 61 20 68 69 67 68 2d 6c | 65 76 65 6c 20 65 76 65 |a high-l|evel eve|
|000046c0| 6e 74 20 63 6f 75 6c 64 | 20 67 65 74 20 70 61 73 |nt could| get pas|
|000046d0| 73 65 64 20 74 6f 20 79 | 6f 75 20 28 69 66 0d 79 |sed to y|ou (if.y|
|000046e0| 6f 75 72 20 70 72 6f 67 | 72 61 6d 20 61 63 63 65 |our prog|ram acce|
|000046f0| 70 74 73 20 74 68 65 6d | 29 2e 20 49 66 20 79 6f |pts them|). If yo|
|00004700| 75 20 63 61 6c 6c 20 57 | 4e 45 20 62 75 74 20 63 |u call W|NE but c|
|00004710| 61 6e 27 74 20 72 65 73 | 70 6f 6e 64 20 74 6f 20 |an't res|pond to |
|00004720| 74 68 65 73 65 0d 65 76 | 65 6e 74 73 20 69 6e 20 |these.ev|ents in |
|00004730| 79 6f 75 72 20 63 6f 6d | 70 75 74 61 74 69 6f 6e |your com|putation|
|00004740| 20 6c 6f 6f 70 2c 20 79 | 6f 75 72 20 77 69 6e 64 | loop, y|our wind|
|00004750| 6f 77 20 77 6f 6e 27 74 | 20 62 65 20 75 70 64 61 |ow won't| be upda|
|00004760| 74 65 64 20 61 6e 64 20 | 79 6f 75 0d 77 6f 6e 27 |ted and |you.won'|
|00004770| 74 20 62 65 20 61 62 6c | 65 20 74 6f 20 70 72 6f |t be abl|e to pro|
|00004780| 63 65 73 73 20 41 70 70 | 6c 65 20 45 76 65 6e 74 |cess App|le Event|
|00004790| 73 2e 20 49 6e 20 79 6f | 75 72 20 63 61 73 65 20 |s. In yo|ur case |
|000047a0| 6d 61 79 62 65 20 74 68 | 69 73 20 69 73 20 6e 6f |maybe th|is is no|
|000047b0| 74 20 61 0d 62 69 67 20 | 64 65 61 6c 2e 0d 0d 54 |t a.big |deal...T|
|000047c0| 68 65 72 65 20 69 73 20 | 6e 6f 20 22 68 61 72 64 |here is |no "hard|
|000047d0| 22 20 72 65 61 73 6f 6e | 20 74 6f 20 68 61 76 65 |" reason| to have|
|000047e0| 20 6f 6e 6c 79 20 6f 6e | 65 20 57 4e 45 20 63 61 | only on|e WNE ca|
|000047f0| 6c 6c 20 69 6e 20 79 6f | 75 72 20 70 72 6f 67 72 |ll in yo|ur progr|
|00004800| 61 6d 2c 20 61 73 0d 6c | 6f 6e 67 20 61 73 20 79 |am, as.l|ong as y|
|00004810| 6f 75 20 6b 6e 6f 77 20 | 74 68 61 74 20 79 6f 75 |ou know |that you|
|00004820| 20 6d 61 79 20 6c 6f 73 | 65 20 65 76 65 6e 74 73 | may los|e events|
|00004830| 2e 0d 0d 47 72 65 67 6f | 72 79 20 4a 6f 72 67 65 |...Grego|ry Jorge|
|00004840| 6e 73 65 6e 0d 52 61 64 | 69 78 20 43 6f 6e 73 75 |nsen.Rad|ix Consu|
|00004850| 6c 74 69 6e 67 20 49 6e | 63 2e 0d 0d 2b 2b 2b 2b |lting In|c...++++|
|00004860| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00004870| 2b 2b 2b 2b 2b 2b 2b 0d | 0d 3e 46 72 6f 6d 20 6b |+++++++.|.>From k|
|00004880| 6c 75 65 76 40 6a 6f 6e | 61 74 68 61 6e 2e 73 72 |luev@jon|athan.sr|
|00004890| 63 63 2e 6d 73 75 2e 73 | 75 20 28 4b 6c 75 65 76 |cc.msu.s|u (Kluev|
|000048a0| 29 0d 44 61 74 65 3a 20 | 53 75 6e 2c 20 32 38 20 |).Date: |Sun, 28 |
|000048b0| 41 75 67 20 39 34 20 31 | 38 3a 31 33 3a 30 39 20 |Aug 94 1|8:13:09 |
|000048c0| 2b 30 34 30 30 0d 4f 72 | 67 61 6e 69 7a 61 74 69 |+0400.Or|ganizati|
|000048d0| 6f 6e 3a 20 28 6e 6f 6e | 65 29 0d 0d 49 6e 20 61 |on: (non|e)..In a|
|000048e0| 72 74 69 63 6c 65 20 3c | 33 33 68 39 35 65 24 65 |rticle <|33h95e$e|
|000048f0| 6b 6e 40 73 65 61 72 63 | 68 30 31 2e 6e 65 77 73 |kn@searc|h01.news|
|00004900| 2e 61 6f 6c 2e 63 6f 6d | 3e 0d 72 61 64 69 78 69 |.aol.com|>.radixi|
|00004910| 6e 63 40 61 6f 6c 2e 63 | 6f 6d 20 28 52 61 64 69 |nc@aol.c|om (Radi|
|00004920| 78 49 6e 63 29 20 77 72 | 6f 74 65 3a 0d 0d 3e 20 |xInc) wr|ote:..> |
|00004930| 49 6e 20 61 72 74 69 63 | 6c 65 20 3c 43 76 32 49 |In artic|le <Cv2I|
|00004940| 7a 6f 2e 41 6f 31 40 6f | 64 69 6e 2e 63 6f 72 70 |zo.Ao1@o|din.corp|
|00004950| 2e 73 67 69 2e 63 6f 6d | 3e 2c 20 72 68 6e 40 77 |.sgi.com|>, rhn@w|
|00004960| 61 6c 74 7a 2e 65 6e 67 | 72 2e 73 67 69 2e 63 6f |altz.eng|r.sgi.co|
|00004970| 6d 0d 28 52 6f 6e 0d 3e | 20 4e 69 63 68 6f 6c 73 |m.(Ron.>| Nichols|
|00004980| 6f 6e 29 20 77 72 69 74 | 65 73 3a 0d 3e 20 3c 3c |on) writ|es:.> <<|
|00004990| 0d 3e 20 46 69 72 73 74 | 20 49 20 69 6e 73 74 61 |.> First| I insta|
|000049a0| 6c 6c 20 61 20 56 42 4c | 20 74 61 73 6b 20 77 68 |ll a VBL| task wh|
|000049b0| 6f 73 65 20 6f 6e 6c 79 | 20 66 75 6e 63 74 69 6f |ose only| functio|
|000049c0| 6e 20 69 73 20 74 6f 20 | 69 6e 63 72 65 6d 65 6e |n is to |incremen|
|000049d0| 74 20 61 0d 67 6c 6f 62 | 61 6c 0d 3e 20 76 61 72 |t a.glob|al.> var|
|000049e0| 69 61 62 6c 65 2e 20 20 | 54 68 61 74 20 67 69 76 |iable. |That giv|
|000049f0| 65 73 20 6d 65 20 61 20 | 74 69 63 6b 63 6f 75 6e |es me a |tickcoun|
|00004a00| 74 20 76 61 72 69 61 62 | 6c 65 20 74 68 61 74 20 |t variab|le that |
|00004a10| 63 61 6e 20 62 65 20 72 | 65 61 64 0d 77 69 74 68 |can be r|ead.with|
|00004a20| 6f 75 74 0d 3e 20 61 20 | 66 75 6e 63 74 69 6f 6e |out.> a |function|
|00004a30| 20 63 61 6c 6c 2e 20 20 | 59 6f 75 20 63 61 6e 20 | call. |You can |
|00004a40| 61 6c 73 6f 20 75 73 65 | 20 74 68 65 20 54 69 63 |also use| the Tic|
|00004a50| 6b 43 6f 75 6e 74 28 29 | 20 61 63 63 65 73 73 20 |kCount()| access |
|00004a60| 66 75 6e 63 74 69 6f 6e | 2e 0d 3e 20 28 4f 72 20 |function|..> (Or |
|00004a70| 79 6f 75 20 63 61 6e 20 | 6a 75 73 74 20 75 73 65 |you can |just use|
|00004a80| 20 74 68 65 20 6c 6f 77 | 6d 65 6d 20 67 6c 6f 62 | the low|mem glob|
|00004a90| 61 6c 20 54 69 63 6b 73 | 20 61 74 20 24 30 31 36 |al Ticks| at $016|
|00004aa0| 41 20 69 66 20 79 6f 75 | 20 61 72 65 6e 27 74 0d |A if you| aren't.|
|00004ab0| 3e 20 73 74 72 69 63 74 | 6c 79 20 66 6f 6c 6c 6f |> strict|ly follo|
|00004ac0| 77 69 6e 67 20 41 70 70 | 6c 65 27 73 20 67 75 69 |wing App|le's gui|
|00004ad0| 64 65 6c 69 6e 65 73 2e | 20 20 57 6f 75 6c 64 20 |delines.| Would |
|00004ae0| 49 20 64 6f 20 74 68 61 | 74 3f 20 3a 2d 29 0d 3e |I do tha|t? :-).>|
|00004af0| 20 3e 3e 0d 3e 20 54 68 | 69 73 20 69 73 20 73 69 | >>.> Th|is is si|
|00004b00| 6c 6c 79 2e 20 4a 75 73 | 74 20 63 61 6c 6c 20 54 |lly. Jus|t call T|
|00004b10| 69 63 6b 43 6f 75 6e 74 | 28 29 2c 20 6f 72 20 69 |ickCount|(), or i|
|00004b20| 66 20 79 6f 75 20 68 61 | 76 65 20 74 6f 2c 20 6a |f you ha|ve to, j|
|00004b30| 75 73 74 20 6c 6f 6f 6b | 20 61 74 0d 3e 20 54 69 |ust look| at.> Ti|
|00004b40| 63 6b 73 2e 20 59 6f 75 | 20 61 72 65 20 6f 76 65 |cks. You| are ove|
|00004b50| 72 6c 79 20 77 6f 72 72 | 69 65 64 20 61 62 6f 75 |rly worr|ied abou|
|00004b60| 74 20 70 65 72 66 6f 72 | 6d 61 6e 63 65 2c 20 79 |t perfor|mance, y|
|00004b70| 65 74 20 79 6f 75 20 69 | 6e 73 74 61 6c 6c 20 61 |et you i|nstall a|
|00004b80| 0d 56 42 4c 0d 3e 20 74 | 61 73 6b 20 74 68 61 74 |.VBL.> t|ask that|
|00004b90| 20 64 6f 65 73 20 74 68 | 65 20 73 61 6d 65 20 74 | does th|e same t|
|00004ba0| 68 69 6e 67 20 61 73 20 | 61 6e 20 65 78 69 73 74 |hing as |an exist|
|00004bb0| 69 6e 67 20 56 42 4c 20 | 74 61 73 6b 20 28 68 6f |ing VBL |task (ho|
|00004bc0| 77 20 64 6f 20 79 6f 75 | 0d 74 68 69 6e 6b 0d 3e |w do you|.think.>|
|00004bd0| 20 54 69 63 6b 73 20 67 | 65 74 73 20 75 70 64 61 | Ticks g|ets upda|
|00004be0| 74 65 64 20 69 6e 20 74 | 68 65 20 66 69 72 73 74 |ted in t|he first|
|00004bf0| 20 70 6c 61 63 65 3f 29 | 2e 0d 0d 46 69 72 73 74 | place?)|...First|
|00004c00| 3a 20 54 68 65 72 65 20 | 69 73 20 6e 6f 20 73 70 |: There |is no sp|
|00004c10| 65 63 69 61 6c 20 56 42 | 4c 20 74 61 73 6b 20 74 |ecial VB|L task t|
|00004c20| 68 61 74 20 69 6e 63 72 | 65 6d 65 6e 74 73 20 54 |hat incr|ements T|
|00004c30| 69 63 6b 73 2e 0d 53 65 | 63 6f 6e 64 3a 20 49 6e |icks..Se|cond: In|
|00004c40| 73 74 61 6c 6c 69 6e 67 | 20 56 42 4c 54 61 73 6b |stalling| VBLTask|
|00004c50| 20 74 68 61 74 20 69 6e | 63 72 65 6d 65 6e 74 73 | that in|crements|
|00004c60| 20 67 6c 6f 62 61 6c 20 | 76 61 72 69 61 62 6c 65 | global |variable|
|00004c70| 20 67 69 76 65 73 20 79 | 6f 75 0d 6d 75 63 68 20 | gives y|ou.much |
|00004c80| 6c 65 73 73 20 61 63 63 | 75 72 61 63 79 20 74 68 |less acc|uracy th|
|00004c90| 61 6e 20 6c 6f 6f 6b 69 | 6e 67 20 69 6e 74 6f 20 |an looki|ng into |
|00004ca0| 54 69 63 6b 73 20 28 54 | 69 63 6b 43 6f 75 6e 74 |Ticks (T|ickCount|
|00004cb0| 29 2e 20 54 68 69 73 20 | 69 6e 61 63 63 75 72 61 |). This |inaccura|
|00004cc0| 63 79 0d 77 69 6c 6c 20 | 68 65 61 76 69 6c 79 20 |cy.will |heavily |
|00004cd0| 64 65 70 65 6e 64 20 6f | 6e 20 6d 61 63 68 69 6e |depend o|n machin|
|00004ce0| 65 20 6c 6f 61 64 20 61 | 6e 64 20 6d 61 79 20 72 |e load a|nd may r|
|00004cf0| 69 73 65 20 75 70 20 74 | 6f 20 73 65 76 65 72 61 |ise up t|o severa|
|00004d00| 6c 20 22 72 65 61 6c 22 | 0d 74 69 63 6b 73 20 61 |l "real"|.ticks a|
|00004d10| 67 61 69 6e 73 74 20 6f | 6e 65 20 22 79 6f 75 72 |gainst o|ne "your|
|00004d20| 22 20 74 69 63 6b 2e 20 | 54 69 63 6b 73 20 69 73 |" tick. |Ticks is|
|00004d30| 20 67 75 61 72 61 6e 74 | 65 65 64 20 74 6f 20 62 | guarant|eed to b|
|00004d40| 65 20 69 6e 63 72 65 6d | 65 6e 74 65 64 0d 65 76 |e increm|ented.ev|
|00004d50| 65 72 79 20 74 69 63 6b | 2c 20 62 75 74 20 79 6f |ery tick|, but yo|
|00004d60| 75 72 20 56 42 4c 54 61 | 73 6b 20 28 77 68 69 63 |ur VBLTa|sk (whic|
|00004d70| 68 20 63 6f 6e 74 61 69 | 6e 73 20 31 20 69 6e 20 |h contai|ns 1 in |
|00004d80| 76 62 6c 43 6f 75 6e 74 | 29 20 69 73 20 6e 6f 74 |vblCount|) is not|
|00004d90| 0d 67 75 61 72 61 6e 74 | 65 65 64 20 74 6f 20 62 |.guarant|eed to b|
|00004da0| 65 20 63 61 6c 6c 65 64 | 20 65 76 65 72 79 20 74 |e called| every t|
|00004db0| 69 63 6b 2e 0d 0d 3e 20 | 57 61 69 74 4e 65 78 74 |ick...> |WaitNext|
|00004dc0| 45 76 65 6e 74 20 66 72 | 6f 6d 20 6d 6f 72 65 20 |Event fr|om more |
|00004dd0| 74 68 61 6e 20 6f 6e 65 | 20 70 6c 61 63 65 20 69 |than one| place i|
|00004de0| 6e 20 79 6f 75 72 20 70 | 72 6f 67 72 61 6d 29 2e |n your p|rogram).|
|00004df0| 20 41 6e 64 20 72 61 74 | 68 65 72 0d 74 68 61 6e | And rat|her.than|
|00004e00| 0d 3e 20 75 73 69 6e 67 | 20 54 69 63 6b 73 20 61 |.> using| Ticks a|
|00004e10| 6e 64 20 74 68 65 20 6c | 6f 63 61 6c 20 63 6f 75 |nd the l|ocal cou|
|00004e20| 6e 74 65 72 2c 20 75 73 | 65 20 61 20 6d 6f 64 75 |nter, us|e a modu|
|00004e30| 6c 6f 20 63 61 6c 63 75 | 6c 61 74 69 6f 6e 20 6f |lo calcu|lation o|
|00004e40| 6e 20 79 6f 75 72 0d 6c | 6f 6f 70 0d 3e 20 76 61 |n your.l|oop.> va|
|00004e50| 72 69 61 62 6c 65 3b 20 | 65 2e 67 2e 20 63 68 65 |riable; |e.g. che|
|00004e60| 63 6b 20 66 6f 72 20 61 | 6e 20 65 76 65 6e 74 20 |ck for a|n event |
|00004e70| 65 76 65 72 79 20 31 30 | 2c 30 30 30 20 69 74 65 |every 10|,000 ite|
|00004e80| 72 61 74 69 6f 6e 73 20 | 6f 72 20 73 6f 2e 0d 0d |rations |or so...|
|00004e90| 54 68 69 73 20 69 73 20 | 62 61 64 20 70 72 61 63 |This is |bad prac|
|00004ea0| 74 69 63 65 2e 20 49 66 | 20 22 31 30 2c 30 30 30 |tice. If| "10,000|
|00004eb0| 22 20 69 73 20 68 61 72 | 64 2d 63 6f 64 65 64 20 |" is har|d-coded |
|00004ec0| 79 6f 75 20 77 69 6c 6c | 20 67 65 74 20 64 69 66 |you will| get dif|
|00004ed0| 66 65 72 65 6e 74 0d 72 | 65 73 70 6f 6e 73 65 20 |ferent.r|esponse |
|00004ee0| 74 69 6d 65 20 6f 6e 20 | 64 69 66 66 65 72 65 6e |time on |differen|
|00004ef0| 74 20 6d 61 63 68 69 6e | 65 73 2e 20 49 74 20 6d |t machin|es. It m|
|00004f00| 61 79 20 62 65 20 63 6f | 6d 70 75 74 65 64 20 61 |ay be co|mputed a|
|00004f10| 74 20 73 74 61 72 74 2d | 74 69 6d 65 2e 0d 42 75 |t start-|time..Bu|
|00004f20| 74 20 74 68 69 6e 6b 3a | 20 6d 61 63 68 69 6e 65 |t think:| machine|
|00004f30| 20 6c 6f 61 64 20 28 56 | 42 4c 73 20 66 6f 72 20 | load (V|BLs for |
|00004f40| 65 78 61 6d 70 6c 65 29 | 20 6d 61 79 20 76 61 72 |example)| may var|
|00004f50| 79 20 64 75 72 69 6e 67 | 20 70 72 6f 67 72 61 6d |y during| program|
|00004f60| 0d 65 78 65 63 75 74 69 | 6f 6e 2e 20 50 72 6f 63 |.executi|on. Proc|
|00004f70| 65 73 73 6f 72 20 63 61 | 63 68 65 20 6d 61 79 20 |essor ca|che may |
|00004f80| 62 65 20 74 75 72 6e 65 | 64 20 6f 6e 2f 6f 66 66 |be turne|d on/off|
|00004f90| 2e 20 41 6c 6c 20 74 68 | 69 73 20 61 6e 64 20 6d |. All th|is and m|
|00004fa0| 6f 72 65 0d 77 69 6c 6c | 20 69 6e 76 61 6c 69 64 |ore.will| invalid|
|00004fb0| 61 74 65 20 74 68 69 73 | 20 22 31 30 2c 30 30 30 |ate this| "10,000|
|00004fc0| 22 20 65 73 74 69 6d 61 | 74 65 2e 20 54 69 63 6b |" estima|te. Tick|
|00004fd0| 73 20 69 73 20 62 65 74 | 74 65 72 2e 0d 0d 4d 69 |s is bet|ter...Mi|
|00004fe0| 63 68 61 65 6c 20 4b 6c | 75 65 76 2e 0d 0d 2b 2b |chael Kl|uev...++|
|00004ff0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00005000| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 0d 0d 3e 46 72 6f 6d |++++++++|+..>From|
|00005010| 20 72 61 64 69 78 69 6e | 63 40 61 6f 6c 2e 63 6f | radixin|c@aol.co|
|00005020| 6d 20 28 52 61 64 69 78 | 49 6e 63 29 0d 44 61 74 |m (Radix|Inc).Dat|
|00005030| 65 3a 20 32 39 20 41 75 | 67 20 31 39 39 34 20 30 |e: 29 Au|g 1994 0|
|00005040| 32 3a 31 33 3a 30 34 20 | 2d 30 34 30 30 0d 4f 72 |2:13:04 |-0400.Or|
|00005050| 67 61 6e 69 7a 61 74 69 | 6f 6e 3a 20 41 6d 65 72 |ganizati|on: Amer|
|00005060| 69 63 61 20 4f 6e 6c 69 | 6e 65 2c 20 49 6e 63 2e |ica Onli|ne, Inc.|
|00005070| 20 28 31 2d 38 30 30 2d | 38 32 37 2d 36 33 36 34 | (1-800-|827-6364|
|00005080| 29 0d 0d 49 6e 20 61 72 | 74 69 63 6c 65 20 3c 35 |)..In ar|ticle <5|
|00005090| 38 34 34 38 36 30 34 36 | 36 36 38 40 6a 6f 6e 61 |84486046|668@jona|
|000050a0| 74 68 61 6e 2e 73 72 63 | 63 2e 6d 73 75 2e 73 75 |than.src|c.msu.su|
|000050b0| 3e 2c 20 6b 6c 75 65 76 | 40 6a 6f 6e 61 74 68 61 |>, kluev|@jonatha|
|000050c0| 6e 2e 73 72 63 63 2e 6d | 73 75 2e 73 75 0d 28 4b |n.srcc.m|su.su.(K|
|000050d0| 6c 75 65 76 29 20 77 72 | 69 74 65 73 3a 0d 0d 3c |luev) wr|ites:..<|
|000050e0| 3c 46 69 72 73 74 3a 20 | 54 68 65 72 65 20 69 73 |<First: |There is|
|000050f0| 20 6e 6f 20 73 70 65 63 | 69 61 6c 20 56 42 4c 20 | no spec|ial VBL |
|00005100| 74 61 73 6b 20 74 68 61 | 74 20 69 6e 63 72 65 6d |task tha|t increm|
|00005110| 65 6e 74 73 20 54 69 63 | 6b 73 2e 3e 3e 0d 0d 4e |ents Tic|ks.>>..N|
|00005120| 6f 74 20 6f 6e 20 6e 65 | 77 65 72 20 4d 61 63 73 |ot on ne|wer Macs|
|00005130| 2c 20 6e 6f 2e 20 54 69 | 63 6b 73 20 75 73 65 64 |, no. Ti|cks used|
|00005140| 20 74 6f 20 67 65 74 20 | 75 70 64 61 74 65 64 20 | to get |updated |
|00005150| 62 79 20 61 20 56 42 4c | 20 74 61 73 6b 2c 20 62 |by a VBL| task, b|
|00005160| 75 74 20 6e 6f 77 20 69 | 74 0d 69 73 20 73 79 6e |ut now i|t.is syn|
|00005170| 74 68 65 73 69 7a 65 64 | 2e 20 49 74 20 64 6f 65 |thesized|. It doe|
|00005180| 73 6e 27 74 20 6d 61 74 | 74 65 72 20 68 6f 77 20 |sn't mat|ter how |
|00005190| 69 74 20 67 65 74 73 20 | 75 70 64 61 74 65 64 3b |it gets |updated;|
|000051a0| 20 74 68 65 20 70 6f 69 | 6e 74 20 69 73 20 74 68 | the poi|nt is th|
|000051b0| 61 74 0d 69 74 20 69 73 | 20 62 65 74 74 65 72 20 |at.it is| better |
|000051c0| 74 6f 20 67 65 74 20 74 | 68 65 20 76 61 6c 75 65 |to get t|he value|
|000051d0| 20 6f 66 20 54 69 63 6b | 73 2c 20 65 69 74 68 65 | of Tick|s, eithe|
|000051e0| 72 20 62 79 20 66 75 6e | 63 74 69 6f 6e 20 63 61 |r by fun|ction ca|
|000051f0| 6c 6c 20 6f 72 20 72 65 | 61 64 69 6e 67 0d 74 68 |ll or re|ading.th|
|00005200| 65 20 67 6c 6f 62 61 6c | 20 64 69 72 65 63 74 6c |e global| directl|
|00005210| 79 2e 20 49 66 20 79 6f | 75 20 75 73 65 20 74 68 |y. If yo|u use th|
|00005220| 65 20 55 6e 69 76 65 72 | 73 61 6c 20 48 65 61 64 |e Univer|sal Head|
|00005230| 65 72 73 20 79 6f 75 20 | 63 61 6e 20 72 65 61 64 |ers you |can read|
|00005240| 20 74 68 65 0d 54 69 63 | 6b 73 20 67 6c 6f 62 61 | the.Tic|ks globa|
|00005250| 6c 20 61 6e 64 20 73 74 | 61 79 20 63 6f 6d 70 61 |l and st|ay compa|
|00005260| 74 69 62 6c 65 20 62 79 | 20 75 73 69 6e 67 20 4c |tible by| using L|
|00005270| 4d 47 65 74 54 69 63 6b | 73 28 29 2e 20 46 6f 72 |MGetTick|s(). For|
|00005280| 20 68 69 73 74 6f 72 69 | 63 61 6c 0d 72 65 61 73 | histori|cal.reas|
|00005290| 6f 6e 73 20 69 74 27 73 | 20 65 61 73 69 65 72 20 |ons it's| easier |
|000052a0| 74 6f 20 70 72 65 74 65 | 6e 64 20 74 68 61 74 20 |to prete|nd that |
|000052b0| 54 69 63 6b 73 20 69 73 | 20 69 6e 63 72 65 6d 65 |Ticks is| increme|
|000052c0| 6e 74 65 64 20 61 74 20 | 56 42 4c 20 74 69 6d 65 |nted at |VBL time|
|000052d0| 2c 20 65 76 65 6e 0d 74 | 68 6f 75 67 68 20 6f 6e |, even.t|hough on|
|000052e0| 20 6d 6f 73 74 20 4d 61 | 63 73 20 69 74 20 69 73 | most Ma|cs it is|
|000052f0| 6e 27 74 20 61 63 74 75 | 61 6c 6c 79 20 64 6f 6e |n't actu|ally don|
|00005300| 65 20 74 68 61 74 20 77 | 61 79 2e 20 49 20 61 70 |e that w|ay. I ap|
|00005310| 6f 6c 6f 67 69 7a 65 20 | 69 66 20 61 6e 79 6f 6e |ologize |if anyon|
|00005320| 65 0d 77 61 73 20 63 6f | 6e 66 75 73 65 64 20 6f |e.was co|nfused o|
|00005330| 72 20 6d 69 73 6c 65 64 | 20 62 79 20 6d 79 20 73 |r misled| by my s|
|00005340| 74 61 74 65 6d 65 6e 74 | 2c 20 62 75 74 20 69 74 |tatement|, but it|
|00005350| 20 72 65 61 6c 6c 79 20 | 6d 61 6b 65 73 20 6e 6f | really |makes no|
|00005360| 20 64 69 66 66 65 72 65 | 6e 63 65 0d 68 6f 77 20 | differe|nce.how |
|00005370| 54 69 63 6b 73 20 67 65 | 74 73 20 69 6e 63 72 65 |Ticks ge|ts incre|
|00005380| 6d 65 6e 74 65 64 2c 20 | 61 6e 64 20 62 79 20 64 |mented, |and by d|
|00005390| 65 73 69 67 6e 20 69 74 | 20 61 70 70 65 61 72 73 |esign it| appears|
|000053a0| 20 74 68 61 74 20 69 74 | 20 69 73 20 64 6f 6e 65 | that it| is done|
|000053b0| 20 61 74 0d 56 42 4c 20 | 74 69 6d 65 2e 0d 0d 3c | at.VBL |time...<|
|000053c0| 3c 54 68 69 73 20 69 73 | 20 62 61 64 20 70 72 61 |<This is| bad pra|
|000053d0| 63 74 69 63 65 2e 20 49 | 66 20 22 31 30 2c 30 30 |ctice. I|f "10,00|
|000053e0| 30 22 20 69 73 20 68 61 | 72 64 2d 63 6f 64 65 64 |0" is ha|rd-coded|
|000053f0| 20 79 6f 75 20 77 69 6c | 6c 20 67 65 74 20 64 69 | you wil|l get di|
|00005400| 66 66 65 72 65 6e 74 0d | 72 65 73 70 6f 6e 73 65 |fferent.|response|
|00005410| 20 74 69 6d 65 20 6f 6e | 20 64 69 66 66 65 72 65 | time on| differe|
|00005420| 6e 74 20 6d 61 63 68 69 | 6e 65 73 2e 3e 3e 0d 0d |nt machi|nes.>>..|
|00005430| 4f 62 76 69 6f 75 73 6c | 79 2c 20 62 75 74 20 79 |Obviousl|y, but y|
|00005440| 6f 75 20 61 72 65 20 6d | 69 73 72 65 61 64 69 6e |ou are m|isreadin|
|00005450| 67 20 6d 79 20 6d 65 73 | 73 61 67 65 2e 20 49 20 |g my mes|sage. I |
|00005460| 77 61 73 6e 27 74 20 73 | 75 67 67 65 73 74 69 6e |wasn't s|uggestin|
|00005470| 67 0d 68 61 72 64 2d 63 | 6f 64 69 6e 67 20 74 68 |g.hard-c|oding th|
|00005480| 65 20 6e 75 6d 62 65 72 | 20 31 30 2c 30 30 30 2c |e number| 10,000,|
|00005490| 20 6f 72 20 61 6e 79 20 | 6f 74 68 65 72 20 6e 75 | or any |other nu|
|000054a0| 6d 62 65 72 2d 2d 49 20 | 77 61 73 20 73 75 67 67 |mber--I |was sugg|
|000054b0| 65 73 74 69 6e 67 20 61 | 0d 6d 6f 64 75 6c 6f 20 |esting a|.modulo |
|000054c0| 63 61 6c 63 75 6c 61 74 | 69 6f 6e 20 62 61 73 65 |calculat|ion base|
|000054d0| 64 20 6f 6e 20 53 4f 4d | 45 20 6d 6f 64 75 6c 75 |d on SOM|E modulu|
|000054e0| 73 2e 20 54 68 65 20 61 | 63 74 75 61 6c 20 6e 75 |s. The a|ctual nu|
|000054f0| 6d 62 65 72 20 75 73 65 | 64 20 63 6f 75 6c 64 20 |mber use|d could |
|00005500| 62 65 0d 61 6e 79 20 76 | 61 6c 75 65 2c 20 61 6e |be.any v|alue, an|
|00005510| 64 20 63 6f 75 6c 64 20 | 62 65 20 63 61 6c 63 75 |d could |be calcu|
|00005520| 6c 61 74 65 64 20 69 6e | 20 61 64 76 61 6e 63 65 |lated in| advance|
|00005530| 20 74 6f 20 61 63 63 6f | 75 6e 74 20 66 6f 72 20 | to acco|unt for |
|00005540| 64 69 66 66 65 72 65 6e | 63 65 73 0d 61 6d 6f 6e |differen|ces.amon|
|00005550| 67 20 6d 61 63 68 69 6e | 65 73 2e 20 31 30 2c 30 |g machin|es. 10,0|
|00005560| 30 30 20 77 61 73 20 73 | 69 6d 70 6c 79 20 61 6e |00 was s|imply an|
|00005570| 20 69 6c 6c 75 73 74 72 | 61 74 69 76 65 20 65 78 | illustr|ative ex|
|00005580| 61 6d 70 6c 65 2c 20 61 | 6e 64 20 74 68 61 74 27 |ample, a|nd that'|
|00005590| 73 20 77 68 79 0d 49 20 | 77 72 6f 74 65 20 22 65 |s why.I |wrote "e|
|000055a0| 2e 67 2e 20 63 68 65 63 | 6b 20 66 6f 72 20 61 6e |.g. chec|k for an|
|000055b0| 20 65 76 65 6e 74 20 65 | 76 65 72 79 20 31 30 2c | event e|very 10,|
|000055c0| 30 30 30 20 69 74 65 72 | 61 74 69 6f 6e 73 20 6f |000 iter|ations o|
|000055d0| 72 20 73 6f 2e 22 20 20 | 22 65 2e 67 2e 22 0d 69 |r so." |"e.g.".i|
|000055e0| 73 20 61 6e 20 61 62 62 | 72 65 76 61 74 69 6f 6e |s an abb|revation|
|000055f0| 20 66 6f 72 20 22 65 78 | 65 6d 70 6c 69 20 67 72 | for "ex|empli gr|
|00005600| 61 74 69 61 2c 22 20 6d | 65 61 6e 69 6e 67 20 22 |atia," m|eaning "|
|00005610| 66 6f 72 20 65 78 61 6d | 70 6c 65 2c 22 20 6e 6f |for exam|ple," no|
|00005620| 74 20 74 6f 20 62 65 0d | 63 6f 6e 66 75 73 65 64 |t to be.|confused|
|00005630| 20 77 69 74 68 20 22 69 | 2e 65 2e 2c 22 20 28 69 | with "i|.e.," (i|
|00005640| 64 20 65 73 74 29 2c 20 | 6d 65 61 6e 69 6e 67 20 |d est), |meaning |
|00005650| 22 74 68 61 74 20 69 73 | 2e 22 20 54 68 69 73 20 |"that is|." This |
|00005660| 73 68 6f 75 6c 64 20 62 | 65 0d 73 65 6c 66 2d 65 |should b|e.self-e|
|00005670| 76 69 64 65 6e 74 20 74 | 6f 20 61 6e 79 6f 6e 65 |vident t|o anyone|
|00005680| 20 63 61 70 61 62 6c 65 | 20 6f 66 20 77 72 69 74 | capable| of writ|
|00005690| 69 6e 67 20 61 20 56 42 | 4c 20 74 61 73 6b 20 69 |ing a VB|L task i|
|000056a0| 6e 20 74 68 65 20 66 69 | 72 73 74 20 70 6c 61 63 |n the fi|rst plac|
|000056b0| 65 2c 0d 61 6e 64 20 74 | 68 65 72 65 66 6f 72 65 |e,.and t|herefore|
|000056c0| 20 49 20 64 69 64 6e 27 | 74 20 73 65 65 20 61 6e | I didn'|t see an|
|000056d0| 79 20 72 65 61 73 6f 6e | 20 74 6f 20 65 78 68 61 |y reason| to exha|
|000056e0| 75 73 74 69 76 65 6c 79 | 20 65 78 70 6c 61 69 6e |ustively| explain|
|000056f0| 20 77 68 61 74 20 49 20 | 77 61 73 0d 73 75 67 67 | what I |was.sugg|
|00005700| 65 73 74 69 6e 67 2e 20 | 51 75 6f 64 20 65 72 61 |esting. |Quod era|
|00005710| 74 20 64 65 6d 6f 6e 73 | 74 72 61 6e 64 75 6d 2e |t demons|trandum.|
|00005720| 0d 0d 3c 3c 42 75 74 20 | 74 68 69 6e 6b 3a 20 6d |..<<But |think: m|
|00005730| 61 63 68 69 6e 65 20 6c | 6f 61 64 20 28 56 42 4c |achine l|oad (VBL|
|00005740| 73 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 29 20 6d |s for ex|ample) m|
|00005750| 61 79 20 76 61 72 79 20 | 64 75 72 69 6e 67 20 70 |ay vary |during p|
|00005760| 72 6f 67 72 61 6d 0d 65 | 78 65 63 75 74 69 6f 6e |rogram.e|xecution|
|00005770| 2e 20 50 72 6f 63 65 73 | 73 6f 72 20 63 61 63 68 |. Proces|sor cach|
|00005780| 65 20 6d 61 79 20 62 65 | 20 74 75 72 6e 65 64 20 |e may be| turned |
|00005790| 6f 6e 2f 6f 66 66 2e 20 | 41 6c 6c 20 74 68 69 73 |on/off. |All this|
|000057a0| 20 61 6e 64 20 6d 6f 72 | 65 0d 77 69 6c 6c 20 69 | and mor|e.will i|
|000057b0| 6e 76 61 6c 69 64 61 74 | 65 20 74 68 69 73 20 22 |nvalidat|e this "|
|000057c0| 31 30 2c 30 30 30 22 20 | 65 73 74 69 6d 61 74 65 |10,000" |estimate|
|000057d0| 2e 20 54 69 63 6b 73 20 | 69 73 20 62 65 74 74 65 |. Ticks |is bette|
|000057e0| 72 2e 3e 3e 0d 0d 49 20 | 61 67 72 65 65 2c 20 62 |r.>>..I |agree, b|
|000057f0| 75 74 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |ut the o|riginal |
|00005800| 70 6f 73 74 2c 20 61 6e | 64 20 6d 79 20 72 65 73 |post, an|d my res|
|00005810| 70 6f 6e 73 65 2c 20 77 | 65 72 65 20 64 69 73 63 |ponse, w|ere disc|
|00005820| 75 73 73 69 6e 67 20 6f | 74 68 65 72 0d 61 70 70 |ussing o|ther.app|
|00005830| 72 6f 61 63 68 65 73 2e | 20 4d 79 20 73 75 67 67 |roaches.| My sugg|
|00005840| 65 73 74 69 6f 6e 2c 20 | 77 68 69 63 68 20 77 61 |estion, |which wa|
|00005850| 73 20 66 6f 6c 6c 6f 77 | 65 64 20 75 70 20 62 79 |s follow|ed up by|
|00005860| 20 65 6d 61 69 6c 2c 20 | 77 61 73 20 74 6f 20 73 | email, |was to s|
|00005870| 69 6d 70 6c 79 0d 72 65 | 61 64 20 74 68 65 20 76 |imply.re|ad the v|
|00005880| 61 6c 75 65 20 6f 66 20 | 54 69 63 6b 73 20 61 6e |alue of |Ticks an|
|00005890| 64 20 62 65 20 64 6f 6e | 65 20 77 69 74 68 20 69 |d be don|e with i|
|000058a0| 74 2e 20 44 6f 6e 65 20 | 63 6f 72 72 65 63 74 6c |t. Done |correctl|
|000058b0| 79 20 74 68 65 20 6d 6f | 64 75 6c 75 73 0d 6d 65 |y the mo|dulus.me|
|000058c0| 74 68 6f 64 20 69 73 20 | 61 20 6c 65 67 69 74 69 |thod is |a legiti|
|000058d0| 6d 61 74 65 20 77 61 79 | 20 74 6f 20 68 61 6e 64 |mate way| to hand|
|000058e0| 6c 65 20 74 68 65 20 70 | 72 6f 62 6c 65 6d 2c 20 |le the p|roblem, |
|000058f0| 69 66 20 66 6f 72 20 73 | 6f 6d 65 20 72 65 61 73 |if for s|ome reas|
|00005900| 6f 6e 20 74 68 65 0d 70 | 72 6f 67 72 61 6d 6d 65 |on the.p|rogramme|
|00005910| 72 20 64 6f 65 73 6e 27 | 74 20 77 61 6e 74 20 74 |r doesn'|t want t|
|00005920| 6f 20 75 73 65 20 54 69 | 63 6b 73 2e 0d 0d 47 72 |o use Ti|cks...Gr|
|00005930| 65 67 6f 72 79 20 4a 6f | 72 67 65 6e 73 65 6e 0d |egory Jo|rgensen.|
|00005940| 52 61 64 69 78 20 43 6f | 6e 73 75 6c 74 69 6e 67 |Radix Co|nsulting|
|00005950| 20 49 6e 63 2e 0d 0d 2b | 2b 2b 2b 2b 2b 2b 2b 2b | Inc...+|++++++++|
|00005960| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00005970| 2b 2b 0d 0d 3e 46 72 6f | 6d 20 62 65 73 62 72 69 |++..>Fro|m besbri|
|00005980| 73 40 6a 65 65 76 65 73 | 2e 75 63 73 64 2e 65 64 |s@jeeves|.ucsd.ed|
|00005990| 75 20 28 44 61 76 69 64 | 20 42 65 73 62 72 69 73 |u (David| Besbris|
|000059a0| 29 0d 44 61 74 65 3a 20 | 32 39 20 41 75 67 20 31 |).Date: |29 Aug 1|
|000059b0| 39 39 34 20 31 30 3a 32 | 35 3a 33 39 20 47 4d 54 |994 10:2|5:39 GMT|
|000059c0| 0d 4f 72 67 61 6e 69 7a | 61 74 69 6f 6e 3a 20 54 |.Organiz|ation: T|
|000059d0| 68 65 20 41 76 61 6e 74 | 2d 47 61 72 64 65 20 6f |he Avant|-Garde o|
|000059e0| 66 20 74 68 65 20 4e 6f | 77 2c 20 4c 74 64 2e 0d |f the No|w, Ltd..|
|000059f0| 0d 4b 6c 75 65 76 20 28 | 6b 6c 75 65 76 40 6a 6f |.Kluev (|kluev@jo|
|00005a00| 6e 61 74 68 61 6e 2e 73 | 72 63 63 2e 6d 73 75 2e |nathan.s|rcc.msu.|
|00005a10| 73 75 29 20 77 72 6f 74 | 65 3a 0d 28 73 6e 69 70 |su) wrot|e:.(snip|
|00005a20| 29 0d 0d 3a 20 46 69 72 | 73 74 3a 20 54 68 65 72 |)..: Fir|st: Ther|
|00005a30| 65 20 69 73 20 6e 6f 20 | 73 70 65 63 69 61 6c 20 |e is no |special |
|00005a40| 56 42 4c 20 74 61 73 6b | 20 74 68 61 74 20 69 6e |VBL task| that in|
|00005a50| 63 72 65 6d 65 6e 74 73 | 20 54 69 63 6b 73 2e 0d |crements| Ticks..|
|00005a60| 3a 20 53 65 63 6f 6e 64 | 3a 20 49 6e 73 74 61 6c |: Second|: Instal|
|00005a70| 6c 69 6e 67 20 56 42 4c | 54 61 73 6b 20 74 68 61 |ling VBL|Task tha|
|00005a80| 74 20 69 6e 63 72 65 6d | 65 6e 74 73 20 67 6c 6f |t increm|ents glo|
|00005a90| 62 61 6c 20 76 61 72 69 | 61 62 6c 65 20 67 69 76 |bal vari|able giv|
|00005aa0| 65 73 20 79 6f 75 0d 3a | 20 6d 75 63 68 20 6c 65 |es you.:| much le|
|00005ab0| 73 73 20 61 63 63 75 72 | 61 63 79 20 74 68 61 6e |ss accur|acy than|
|00005ac0| 20 6c 6f 6f 6b 69 6e 67 | 20 69 6e 74 6f 20 54 69 | looking| into Ti|
|00005ad0| 63 6b 73 20 28 54 69 63 | 6b 43 6f 75 6e 74 29 2e |cks (Tic|kCount).|
|00005ae0| 20 54 68 69 73 20 69 6e | 61 63 63 75 72 61 63 79 | This in|accuracy|
|00005af0| 0d 3a 20 77 69 6c 6c 20 | 68 65 61 76 69 6c 79 20 |.: will |heavily |
|00005b00| 64 65 70 65 6e 64 20 6f | 6e 20 6d 61 63 68 69 6e |depend o|n machin|
|00005b10| 65 20 6c 6f 61 64 20 61 | 6e 64 20 6d 61 79 20 72 |e load a|nd may r|
|00005b20| 69 73 65 20 75 70 20 74 | 6f 20 73 65 76 65 72 61 |ise up t|o severa|
|00005b30| 6c 20 22 72 65 61 6c 22 | 0d 3a 20 74 69 63 6b 73 |l "real"|.: ticks|
|00005b40| 20 61 67 61 69 6e 73 74 | 20 6f 6e 65 20 22 79 6f | against| one "yo|
|00005b50| 75 72 22 20 74 69 63 6b | 2e 20 54 69 63 6b 73 20 |ur" tick|. Ticks |
|00005b60| 69 73 20 67 75 61 72 61 | 6e 74 65 65 64 20 74 6f |is guara|nteed to|
|00005b70| 20 62 65 20 69 6e 63 72 | 65 6d 65 6e 74 65 64 0d | be incr|emented.|
|00005b80| 3a 20 65 76 65 72 79 20 | 74 69 63 6b 2c 20 62 75 |: every |tick, bu|
|00005b90| 74 20 79 6f 75 72 20 56 | 42 4c 54 61 73 6b 20 28 |t your V|BLTask (|
|00005ba0| 77 68 69 63 68 20 63 6f | 6e 74 61 69 6e 73 20 31 |which co|ntains 1|
|00005bb0| 20 69 6e 20 76 62 6c 43 | 6f 75 6e 74 29 20 69 73 | in vblC|ount) is|
|00005bc0| 20 6e 6f 74 0d 3a 20 67 | 75 61 72 61 6e 74 65 65 | not.: g|uarantee|
|00005bd0| 64 20 74 6f 20 62 65 20 | 63 61 6c 6c 65 64 20 65 |d to be |called e|
|00005be0| 76 65 72 79 20 74 69 63 | 6b 2e 0d 0d 28 73 6e 69 |very tic|k...(sni|
|00005bf0| 70 29 0d 0d 3a 20 54 68 | 69 73 20 69 73 20 62 61 |p)..: Th|is is ba|
|00005c00| 64 20 70 72 61 63 74 69 | 63 65 2e 20 49 66 20 22 |d practi|ce. If "|
|00005c10| 31 30 2c 30 30 30 22 20 | 69 73 20 68 61 72 64 2d |10,000" |is hard-|
|00005c20| 63 6f 64 65 64 20 79 6f | 75 20 77 69 6c 6c 20 67 |coded yo|u will g|
|00005c30| 65 74 20 64 69 66 66 65 | 72 65 6e 74 0d 3a 20 72 |et diffe|rent.: r|
|00005c40| 65 73 70 6f 6e 73 65 20 | 74 69 6d 65 20 6f 6e 20 |esponse |time on |
|00005c50| 64 69 66 66 65 72 65 6e | 74 20 6d 61 63 68 69 6e |differen|t machin|
|00005c60| 65 73 2e 20 49 74 20 6d | 61 79 20 62 65 20 63 6f |es. It m|ay be co|
|00005c70| 6d 70 75 74 65 64 20 61 | 74 20 73 74 61 72 74 2d |mputed a|t start-|
|00005c80| 74 69 6d 65 2e 0d 3a 20 | 42 75 74 20 74 68 69 6e |time..: |But thin|
|00005c90| 6b 3a 20 6d 61 63 68 69 | 6e 65 20 6c 6f 61 64 20 |k: machi|ne load |
|00005ca0| 28 56 42 4c 73 20 66 6f | 72 20 65 78 61 6d 70 6c |(VBLs fo|r exampl|
|00005cb0| 65 29 20 6d 61 79 20 76 | 61 72 79 20 64 75 72 69 |e) may v|ary duri|
|00005cc0| 6e 67 20 70 72 6f 67 72 | 61 6d 0d 3a 20 65 78 65 |ng progr|am.: exe|
|00005cd0| 63 75 74 69 6f 6e 2e 20 | 50 72 6f 63 65 73 73 6f |cution. |Processo|
|00005ce0| 72 20 63 61 63 68 65 20 | 6d 61 79 20 62 65 20 74 |r cache |may be t|
|00005cf0| 75 72 6e 65 64 20 6f 6e | 2f 6f 66 66 2e 20 41 6c |urned on|/off. Al|
|00005d00| 6c 20 74 68 69 73 20 61 | 6e 64 20 6d 6f 72 65 0d |l this a|nd more.|
|00005d10| 3a 20 77 69 6c 6c 20 69 | 6e 76 61 6c 69 64 61 74 |: will i|nvalidat|
|00005d20| 65 20 74 68 69 73 20 22 | 31 30 2c 30 30 30 22 20 |e this "|10,000" |
|00005d30| 65 73 74 69 6d 61 74 65 | 2e 20 54 69 63 6b 73 20 |estimate|. Ticks |
|00005d40| 69 73 20 62 65 74 74 65 | 72 2e 0d 0d 3a 20 4d 69 |is bette|r...: Mi|
|00005d50| 63 68 61 65 6c 20 4b 6c | 75 65 76 2e 0d 0d 54 69 |chael Kl|uev...Ti|
|00005d60| 63 6b 73 20 69 73 20 49 | 4e 44 45 45 44 20 69 6e |cks is I|NDEED in|
|00005d70| 63 72 65 6d 65 6e 74 65 | 64 20 62 79 20 61 20 73 |cremente|d by a s|
|00005d80| 79 73 74 65 6d 2d 69 6e | 73 74 61 6c 6c 65 64 20 |ystem-in|stalled |
|00005d90| 56 42 4c 20 74 61 73 6b | 2c 20 61 6e 64 20 69 73 |VBL task|, and is|
|00005da0| 20 4e 4f 54 0d 67 75 61 | 72 61 6e 74 65 65 64 20 | NOT.gua|ranteed |
|00005db0| 74 6f 20 62 65 20 69 6e | 63 65 72 65 6d 65 6e 74 |to be in|cerement|
|00005dc0| 65 64 20 65 78 61 63 74 | 6c 79 20 20 6f 6e 63 65 |ed exact|ly once|
|00005dd0| 20 65 76 65 79 20 74 69 | 63 6b 2e 20 28 66 6f 72 | evey ti|ck. (for|
|00005de0| 20 74 68 65 20 72 65 61 | 73 6f 6e 73 20 74 68 61 | the rea|sons tha|
|00005df0| 74 0d 79 6f 75 20 6d 65 | 6e 74 69 6f 6e 20 61 62 |t.you me|ntion ab|
|00005e00| 6f 75 74 20 74 68 65 20 | 69 6e 61 63 63 75 72 61 |out the |inaccura|
|00005e10| 63 79 20 6f 66 20 75 73 | 69 6e 67 20 61 20 56 42 |cy of us|ing a VB|
|00005e20| 4c 20 74 61 73 6b 2e 29 | 20 49 27 6d 20 63 75 72 |L task.)| I'm cur|
|00005e30| 69 6f 75 73 2c 20 77 68 | 79 20 64 6f 20 79 6f 75 |ious, wh|y do you|
|00005e40| 0d 73 61 79 20 6f 74 68 | 65 72 77 69 73 65 3f 20 |.say oth|erwise? |
|00005e50| 0d 0d 0d 2d 44 61 76 65 | 20 0d 0d 4f 6e 65 20 6f |...-Dave| ..One o|
|00005e60| 66 20 74 68 65 20 6c 61 | 73 74 20 4d 61 63 20 50 |f the la|st Mac P|
|00005e70| 61 73 63 61 6c 20 70 72 | 6f 67 72 61 6d 6d 65 72 |ascal pr|ogrammer|
|00005e80| 73 2e 2e 2e 0d 0d 62 65 | 73 62 72 69 73 40 6a 65 |s.....be|sbris@je|
|00005e90| 65 76 65 73 2e 75 63 73 | 64 2e 65 64 75 0d 0d 0d |eves.ucs|d.edu...|
|00005ea0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00005eb0| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 0d 0d 3e 46 72 |++++++++|+++..>Fr|
|00005ec0| 6f 6d 20 6b 6c 75 65 76 | 40 6a 6f 6e 61 74 68 61 |om kluev|@jonatha|
|00005ed0| 6e 2e 73 72 63 63 2e 6d | 73 75 2e 73 75 20 28 4b |n.srcc.m|su.su (K|
|00005ee0| 6c 75 65 76 29 0d 44 61 | 74 65 3a 20 54 75 65 2c |luev).Da|te: Tue,|
|00005ef0| 20 33 30 20 41 75 67 20 | 39 34 20 31 36 3a 34 32 | 30 Aug |94 16:42|
|00005f00| 3a 31 38 20 2b 30 34 30 | 30 0d 4f 72 67 61 6e 69 |:18 +040|0.Organi|
|00005f10| 7a 61 74 69 6f 6e 3a 20 | 28 6e 6f 6e 65 29 0d 0d |zation: |(none)..|
|00005f20| 49 6e 20 61 72 74 69 63 | 6c 65 20 3c 33 33 73 64 |In artic|le <33sd|
|00005f30| 33 33 24 34 6c 68 40 6e | 65 74 77 6f 72 6b 2e 75 |33$4lh@n|etwork.u|
|00005f40| 63 73 64 2e 65 64 75 3e | 0d 62 65 73 62 72 69 73 |csd.edu>|.besbris|
|00005f50| 40 6a 65 65 76 65 73 2e | 75 63 73 64 2e 65 64 75 |@jeeves.|ucsd.edu|
|00005f60| 20 28 44 61 76 69 64 20 | 42 65 73 62 72 69 73 29 | (David |Besbris)|
|00005f70| 20 77 72 6f 74 65 3a 0d | 0d 3e 20 4b 6c 75 65 76 | wrote:.|.> Kluev|
|00005f80| 20 28 6b 6c 75 65 76 40 | 6a 6f 6e 61 74 68 61 6e | (kluev@|jonathan|
|00005f90| 2e 73 72 63 63 2e 6d 73 | 75 2e 73 75 29 20 77 72 |.srcc.ms|u.su) wr|
|00005fa0| 6f 74 65 3a 0d 3e 20 28 | 73 6e 69 70 29 0d 3e 20 |ote:.> (|snip).> |
|00005fb0| 0d 3e 20 3a 20 46 69 72 | 73 74 3a 20 54 68 65 72 |.> : Fir|st: Ther|
|00005fc0| 65 20 69 73 20 6e 6f 20 | 73 70 65 63 69 61 6c 20 |e is no |special |
|00005fd0| 56 42 4c 20 74 61 73 6b | 20 74 68 61 74 20 69 6e |VBL task| that in|
|00005fe0| 63 72 65 6d 65 6e 74 73 | 20 54 69 63 6b 73 2e 0d |crements| Ticks..|
|00005ff0| 3e 20 3a 20 53 65 63 6f | 6e 64 3a 20 49 6e 73 74 |> : Seco|nd: Inst|
|00006000| 61 6c 6c 69 6e 67 20 56 | 42 4c 54 61 73 6b 20 74 |alling V|BLTask t|
|00006010| 68 61 74 20 69 6e 63 72 | 65 6d 65 6e 74 73 20 67 |hat incr|ements g|
|00006020| 6c 6f 62 61 6c 20 76 61 | 72 69 61 62 6c 65 20 67 |lobal va|riable g|
|00006030| 69 76 65 73 0d 79 6f 75 | 0d 3e 20 3a 20 6d 75 63 |ives.you|.> : muc|
|00006040| 68 20 6c 65 73 73 20 61 | 63 63 75 72 61 63 79 20 |h less a|ccuracy |
|00006050| 74 68 61 6e 20 6c 6f 6f | 6b 69 6e 67 20 69 6e 74 |than loo|king int|
|00006060| 6f 20 54 69 63 6b 73 20 | 28 54 69 63 6b 43 6f 75 |o Ticks |(TickCou|
|00006070| 6e 74 29 2e 20 54 68 69 | 73 0d 69 6e 61 63 63 75 |nt). Thi|s.inaccu|
|00006080| 72 61 63 79 0d 3e 20 3a | 20 77 69 6c 6c 20 68 65 |racy.> :| will he|
|00006090| 61 76 69 6c 79 20 64 65 | 70 65 6e 64 20 6f 6e 20 |avily de|pend on |
|000060a0| 6d 61 63 68 69 6e 65 20 | 6c 6f 61 64 20 61 6e 64 |machine |load and|
|000060b0| 20 6d 61 79 20 72 69 73 | 65 20 75 70 20 74 6f 20 | may ris|e up to |
|000060c0| 73 65 76 65 72 61 6c 0d | 22 72 65 61 6c 22 0d 3e |several.|"real".>|
|000060d0| 20 3a 20 74 69 63 6b 73 | 20 61 67 61 69 6e 73 74 | : ticks| against|
|000060e0| 20 6f 6e 65 20 22 79 6f | 75 72 22 20 74 69 63 6b | one "yo|ur" tick|
|000060f0| 2e 20 54 69 63 6b 73 20 | 69 73 20 67 75 61 72 61 |. Ticks |is guara|
|00006100| 6e 74 65 65 64 20 74 6f | 20 62 65 0d 69 6e 63 72 |nteed to| be.incr|
|00006110| 65 6d 65 6e 74 65 64 0d | 3e 20 3a 20 65 76 65 72 |emented.|> : ever|
|00006120| 79 20 74 69 63 6b 2c 20 | 62 75 74 20 79 6f 75 72 |y tick, |but your|
|00006130| 20 56 42 4c 54 61 73 6b | 20 28 77 68 69 63 68 20 | VBLTask| (which |
|00006140| 63 6f 6e 74 61 69 6e 73 | 20 31 20 69 6e 20 76 62 |contains| 1 in vb|
|00006150| 6c 43 6f 75 6e 74 29 20 | 69 73 20 6e 6f 74 0d 3e |lCount) |is not.>|
|00006160| 20 3a 20 67 75 61 72 61 | 6e 74 65 65 64 20 74 6f | : guara|nteed to|
|00006170| 20 62 65 20 63 61 6c 6c | 65 64 20 65 76 65 72 79 | be call|ed every|
|00006180| 20 74 69 63 6b 2e 0d 3e | 20 0d 3e 20 3a 20 4d 69 | tick..>| .> : Mi|
|00006190| 63 68 61 65 6c 20 4b 6c | 75 65 76 2e 0d 3e 20 0d |chael Kl|uev..> .|
|000061a0| 3e 20 54 69 63 6b 73 20 | 69 73 20 49 4e 44 45 45 |> Ticks |is INDEE|
|000061b0| 44 20 69 6e 63 72 65 6d | 65 6e 74 65 64 20 62 79 |D increm|ented by|
|000061c0| 20 61 20 73 79 73 74 65 | 6d 2d 69 6e 73 74 61 6c | a syste|m-instal|
|000061d0| 6c 65 64 20 56 42 4c 20 | 74 61 73 6b 2c 20 61 6e |led VBL |task, an|
|000061e0| 64 20 69 73 0d 4e 4f 54 | 0d 3e 20 67 75 61 72 61 |d is.NOT|.> guara|
|000061f0| 6e 74 65 65 64 20 74 6f | 20 62 65 20 69 6e 63 65 |nteed to| be ince|
|00006200| 72 65 6d 65 6e 74 65 64 | 20 65 78 61 63 74 6c 79 |remented| exactly|
|00006210| 20 20 6f 6e 63 65 20 65 | 76 65 79 20 74 69 63 6b | once e|vey tick|
|00006220| 2e 20 28 66 6f 72 20 74 | 68 65 0d 72 65 61 73 6f |. (for t|he.reaso|
|00006230| 6e 73 20 74 68 61 74 0d | 3e 20 79 6f 75 20 6d 65 |ns that.|> you me|
|00006240| 6e 74 69 6f 6e 20 61 62 | 6f 75 74 20 74 68 65 20 |ntion ab|out the |
|00006250| 69 6e 61 63 63 75 72 61 | 63 79 20 6f 66 20 75 73 |inaccura|cy of us|
|00006260| 69 6e 67 20 61 20 56 42 | 4c 20 74 61 73 6b 2e 29 |ing a VB|L task.)|
|00006270| 20 49 27 6d 20 63 75 72 | 69 6f 75 73 2c 0d 77 68 | I'm cur|ious,.wh|
|00006280| 79 20 64 6f 0d 3e 20 79 | 6f 75 20 73 61 79 20 6f |y do.> y|ou say o|
|00006290| 74 68 65 72 77 69 73 65 | 3f 20 0d 3e 20 0d 3e 20 |therwise|? .> .> |
|000062a0| 2d 44 61 76 65 20 0d 0d | 48 65 72 65 27 73 20 74 |-Dave ..|Here's t|
|000062b0| 68 65 20 73 74 6f 72 79 | 20 6f 6e 20 68 6f 77 20 |he story| on how |
|000062c0| 56 42 4c 20 6d 65 63 68 | 61 6e 69 73 6d 20 77 6f |VBL mech|anism wo|
|000062d0| 72 6b 2c 20 61 74 20 6c | 65 61 73 74 20 61 73 20 |rk, at l|east as |
|000062e0| 49 20 75 6e 64 65 72 73 | 74 61 6e 64 0d 69 74 2e |I unders|tand.it.|
|000062f0| 20 54 69 63 6b 73 20 69 | 73 20 75 70 64 61 74 65 | Ticks i|s update|
|00006300| 64 20 62 79 20 22 56 42 | 4c 20 6d 65 63 68 61 6e |d by "VB|L mechan|
|00006310| 69 73 6d 22 2c 20 2a 6e | 6f 74 2a 20 62 79 20 73 |ism", *n|ot* by s|
|00006320| 79 73 74 65 6d 2d 69 6e | 73 74 61 6c 6c 65 64 0d |ystem-in|stalled.|
|00006330| 56 42 4c 20 74 61 73 6b | 2e 20 54 68 65 20 66 69 |VBL task|. The fi|
|00006340| 72 73 74 20 74 68 69 6e | 67 20 74 68 61 74 20 69 |rst thin|g that i|
|00006350| 73 20 64 6f 6e 65 20 62 | 79 20 56 42 4c 20 6d 65 |s done b|y VBL me|
|00006360| 63 68 61 6e 69 73 6d 20 | 69 73 20 69 6e 63 72 65 |chanism |is incre|
|00006370| 6d 65 6e 74 69 6e 67 0d | 54 69 63 6b 73 20 76 61 |menting.|Ticks va|
|00006380| 72 69 61 62 6c 65 2e 20 | 54 68 65 6e 20 69 74 20 |riable. |Then it |
|00006390| 67 65 74 73 20 73 75 72 | 65 20 74 68 61 74 20 69 |gets sur|e that i|
|000063a0| 74 20 69 73 20 6e 6f 74 | 20 61 6c 72 65 61 64 79 |t is not| already|
|000063b0| 20 72 75 6e 6e 69 6e 67 | 0d 28 62 79 20 6c 6f 6f | running|.(by loo|
|000063c0| 6b 69 6e 67 20 69 6e 20 | 56 42 4c 51 75 65 75 65 |king in |VBLQueue|
|000063d0| 29 2e 20 49 66 20 69 74 | 20 69 73 20 61 6c 72 65 |). If it| is alre|
|000063e0| 61 64 79 20 72 75 6e 6e | 69 6e 67 2c 20 74 68 65 |ady runn|ing, the|
|000063f0| 72 65 20 69 73 20 6e 6f | 74 68 69 6e 67 0d 74 6f |re is no|thing.to|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.